Skip to content

Commit

Permalink
v0.0.8p4 update
Browse files Browse the repository at this point in the history
  • Loading branch information
Tianscar committed Oct 26, 2022
1 parent 320aac4 commit 5376b3f
Show file tree
Hide file tree
Showing 10 changed files with 85 additions and 37 deletions.
4 changes: 2 additions & 2 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ allprojects {
appVendor = 'AnsdoShip'
appPackageName = 'com.ansdoship.carbonizedpixeldungeon'

appVersionCode = 31
appVersionName = '0.0.8p3-ALPHA'
appVersionCode = 32
appVersionName = '0.0.8p4-ALPHA'

appJavaCompatibility = JavaVersion.VERSION_1_8

Expand Down
Binary file modified core/src/main/assets/sprites/items.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,10 @@
import com.ansdoship.carbonizedpixeldungeon.utils.BArray;
import com.ansdoship.carbonizedpixeldungeon.utils.GLog;
import com.ansdoship.pixeldungeonclasses.noosa.audio.Sample;
import com.ansdoship.pixeldungeonclasses.utils.*;
import com.ansdoship.pixeldungeonclasses.utils.Bundlable;
import com.ansdoship.pixeldungeonclasses.utils.Bundle;
import com.ansdoship.pixeldungeonclasses.utils.PathFinder;
import com.ansdoship.pixeldungeonclasses.utils.Random;

import java.util.Arrays;
import java.util.HashSet;
Expand Down Expand Up @@ -330,19 +333,17 @@ public boolean attack( Char enemy, float dmgMulti, float dmgBonus, float accMult
if (effectiveDamage > 0 || !enemy.blockSound(Random.Float(0.96f, 1.05f))) {
hitSound(Random.Float(0.87f, 1.15f));
}
if (effectiveDamage == 0 && enemy.isAlive() && enemy == Dungeon.hero
else if (effectiveDamage == 0
&& enemy.isAlive()
&& this != Dungeon.hero
&& enemy == Dungeon.hero
&& Dungeon.hero.canAttack(this)
&& Dungeon.hero.subClass == HeroSubClass.SHIELDGUARD
&& Dungeon.hero.hasTalent(Talent.COUNTERATTACK)
&& Dungeon.hero.buff(DefensiveStance.class) != null) {
Dungeon.hero.busy();
enemy.sprite.showStatus( CharSprite.NEUTRAL, Messages.get(Monk.class, "parried") );
enemy.sprite.attack(enemy.pos, new Callback() {
@Override
public void call() {
Dungeon.hero.attack( Char.this, 0.25f + 0.25f * Dungeon.hero.pointsInTalent(Talent.COUNTERATTACK),
0, 1.0f );
}
});
Buff.affect(enemy, Talent.CounterAttackTracker.class).enemy = this;
Dungeon.hero.busy();
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

import com.ansdoship.carbonizedpixeldungeon.Assets;
import com.ansdoship.carbonizedpixeldungeon.Dungeon;
import com.ansdoship.carbonizedpixeldungeon.actors.Char;
import com.ansdoship.carbonizedpixeldungeon.actors.hero.Hero;
import com.ansdoship.carbonizedpixeldungeon.actors.hero.Talent;
import com.ansdoship.carbonizedpixeldungeon.effects.SpellSprite;
Expand Down Expand Up @@ -31,13 +30,6 @@ public boolean act() {
return true;
}

@Override
public boolean attachTo(Char target) {
if (!(target instanceof Hero)) return false;
showEnableEffects(true);
return super.attachTo(target);
}

@Override
public int icon() {
return BuffIndicator.SHIELD;
Expand All @@ -64,9 +56,9 @@ public void detach() {
super.detach();
}

private void showEnableEffects(boolean enabled) {
public void showEnableEffects(boolean enabled) {
Hero hero = Dungeon.hero;
if (hero.sprite != null) {
if (hero != null && hero.sprite != null) {
if (enabled) {
Sample.INSTANCE.play( Assets.Sounds.HIT_PARRY, 1, Random.Float(1.05f, 1.2f) );
hero.sprite.operate( hero.pos );
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1329,8 +1329,8 @@ public void rest( boolean fullRest ) {
if (hasTalent(Talent.HOLD_FAST)){
Buff.affect(this, HoldFast.class);
}
if (subClass == HeroSubClass.SHIELDGUARD) {
Buff.affect(this, DefensiveStance.class);
if (subClass == HeroSubClass.SHIELDGUARD && buff(DefensiveStance.class) == null) {
Buff.affect(this, DefensiveStance.class).showEnableEffects(true);
showStatus = false;
}
if (sprite != null && showStatus) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,11 +50,13 @@
import com.ansdoship.carbonizedpixeldungeon.messages.Languages;
import com.ansdoship.carbonizedpixeldungeon.messages.Messages;
import com.ansdoship.carbonizedpixeldungeon.scenes.GameScene;
import com.ansdoship.carbonizedpixeldungeon.ui.AttackIndicator;
import com.ansdoship.carbonizedpixeldungeon.ui.BuffIndicator;
import com.ansdoship.pixeldungeonclasses.noosa.Image;
import com.ansdoship.pixeldungeonclasses.noosa.audio.Sample;
import com.ansdoship.pixeldungeonclasses.noosa.particles.Emitter;
import com.ansdoship.pixeldungeonclasses.utils.Bundle;
import com.ansdoship.pixeldungeonclasses.utils.Callback;
import com.ansdoship.pixeldungeonclasses.utils.PathFinder;
import com.ansdoship.pixeldungeonclasses.utils.Random;

Expand Down Expand Up @@ -145,6 +147,39 @@ public static class ImprovisedProjectileCooldown extends FlavourBuff{
public String desc() { return Messages.get(this, "desc", dispTurns(visualcooldown())); }
};
public static class LethalMomentumTracker extends FlavourBuff{};
public static class CounterAttackTracker extends Buff{
{ actPriority = HERO_PRIO+1;}
public Char enemy;
@Override
public boolean act() {
target.sprite.attack(enemy.pos, new Callback() {
@Override
public void call() {

AttackIndicator.target(enemy);

boolean wasAlly = enemy.alignment == target.alignment;
Hero hero = (Hero) target;
hero.attack(enemy, 0.25f + 0.25f * Dungeon.hero.pointsInTalent(Talent.COUNTERATTACK), 0, 1.0f);
if (!enemy.isAlive() || (!wasAlly && enemy.alignment == target.alignment)) {
if (hero.hasTalent(Talent.LETHAL_DEFENSE)) {
if (Dungeon.hero.pointsInTalent(Talent.LETHAL_DEFENSE) == 2) {
Buff.affect(Dungeon.hero, Talent.MeleeMustHit.class);
}
if (hero.buff(BrokenSeal.WarriorShield.class) != null){
BrokenSeal.WarriorShield shield = hero.buff(BrokenSeal.WarriorShield.class);
shield.supercharge(Math.round(shield.maxShield() * hero.pointsInTalent(Talent.LETHAL_DEFENSE)*0.5f));
}
}
}

next();
}
});
detach();
return false;
}
}
public static class StrikingWaveTracker extends FlavourBuff{};
public static class WandPreservationCounter extends CounterBuff{{revivePersists = true;}};
public static class EmpoweredStrikeTracker extends FlavourBuff{};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -153,10 +153,10 @@ protected void onClick() {
message = Messages.get(this, "patch_intro");
message += "\n";
//message += "\n" + "null";
message += "\n" + Messages.get(this, "patch_balance");
message += "\n" + Messages.get(this, "patch_features");
//message += "\n" + Messages.get(this, "patch_balance");
//message += "\n" + Messages.get(this, "patch_features");
message += "\n" + Messages.get(this, "patch_bugfixes");
message += "\n" + Messages.get(this, "patch_translations");
//message += "\n" + Messages.get(this, "patch_translations");

}
} else {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -228,9 +228,10 @@ private static void assignItemRect( int item, int width, int height ){
public static final int LIGHT_CROSSBOW = WEP_TIER2+5;
static{
assignItemRect(SHORTSWORD, 13, 13);
assignItemRect(HAND_AXE, 12, 14);
assignItemRect(HAND_AXE, 11, 14);
assignItemRect(SPEAR, 16, 16);
assignItemRect(QUARTERSTAFF, 16, 16);
assignItemRect(DIRK, 13, 14);
assignItemRect(LIGHT_CROSSBOW, 14, 14);
}

Expand All @@ -243,11 +244,11 @@ private static void assignItemRect( int item, int width, int height ){
public static final int WHIP = WEP_TIER3+5;
static{
assignItemRect(SWORD, 14, 14);
assignItemRect(MACE, 15, 15);
assignItemRect(MACE, 16, 16);
assignItemRect(SCIMITAR, 13, 16);
assignItemRect(ROUND_SHIELD, 16, 16);
assignItemRect(SAI, 16, 16);
assignItemRect(WHIP, 14, 14);
assignItemRect(WHIP, 15, 15);
}

private static final int WEP_TIER4 = xy(17, 8); //16 slots
Expand All @@ -260,9 +261,9 @@ private static void assignItemRect( int item, int width, int height ){
static{
assignItemRect(LONGSWORD, 15, 15);
assignItemRect(BATTLE_AXE, 16, 16);
assignItemRect(FLAIL, 14, 14);
assignItemRect(RUNIC_BLADE, 14, 14);
assignItemRect(ASSASSINS_BLADE, 14, 15);
assignItemRect(FLAIL, 14, 15);
assignItemRect(RUNIC_BLADE, 16, 16);
assignItemRect(ASSASSINS_BLADE, 16, 16);
assignItemRect(CROSSBOW, 15, 15);
}

Expand All @@ -277,7 +278,7 @@ private static void assignItemRect( int item, int width, int height ){
assignItemRect(GREATSWORD, 16, 16);
assignItemRect(WAR_HAMMER, 16, 16);
assignItemRect(GLAIVE, 16, 16);
assignItemRect(GREATAXE, 12, 16);
assignItemRect(GREATAXE, 13, 16);
assignItemRect(GREATSHIELD, 12, 16);
assignItemRect(GAUNTLETS, 13, 15);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -223,10 +223,13 @@ public void updateText(){
} else if (item instanceof Weapon || item instanceof Armor || item instanceof Wand) {

if (item.levelKnown) {
int strreq = item instanceof Weapon ? ((Weapon)item).STRReq() : item instanceof Armor ? ((Armor)item).STRReq() : 0;
int strreq = item instanceof Weapon ? ((Weapon)item).STRReq() :
(item instanceof Armor ? ((Armor)item).STRReq() : 0);
int dexreq = item instanceof MissileWeapon ? ((MissileWeapon)item).DEXReq() :
item instanceof RangedWeapon ? ((RangedWeapon)item).DEXReq() : 0;
int intreq = item instanceof Wand ? ((Wand)item).INTReq() : item instanceof MagesStaff ? ((MagesStaff)item).getWand().INTReq() : 0;
(item instanceof RangedWeapon ? ((RangedWeapon)item).DEXReq() : 0);
int intreq = item instanceof Wand ? ((Wand)item).INTReq() :
(item instanceof MagesStaff ?
(((MagesStaff)item).getWand() == null ? 0 : ((MagesStaff)item).getWand().INTReq()) : 0);
if (strreq > Dungeon.hero.STR()) {
extra.text( Messages.format( TXT_EXTRA, strreq ));
extra.hardlight( DEGRADED );
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ public static void addAllChanges( ArrayList<ChangeInfo> changeInfos ) {
changes.hardlight( Window.TITLE_COLOR );
changeInfos.add(changes);

add_v0_0_8p4_changes(changeInfos);
add_v0_0_8p3_changes(changeInfos);
add_v0_0_8p2_changes(changeInfos);
add_v0_0_8p1_changes(changeInfos);
Expand Down Expand Up @@ -81,6 +82,21 @@ public static void addAllChanges( ArrayList<ChangeInfo> changeInfos ) {
add_v0_0_1_Changes(changeInfos);
}

public static void add_v0_0_8p4_changes( ArrayList<ChangeInfo> changeInfos ) {
ChangeInfo changes = new ChangeInfo("v0.0.8p3", false, "");
changes.hardlight(Window.TITLE_COLOR);
changeInfos.add(changes);

changes.addButton( new ChangeButton(Icons.get(Icons.DISPLAY), "界面改进",
"更新了部分贴图(特别鸣谢_@大西洋秘制水煮H39_)"));

changes.addButton(new ChangeButton(new Image(Assets.Sprites.SPINNER, 144, 0, 16, 16), Messages.get(ChangesScene.class, "bugfixes"),
"尝试修复了:\n" +
"_-_ 法师灌注老魔杖崩溃的Bug\n" +
"_-_ 盾卫在防御姿态下退出再进崩溃的Bug\n" +
"_-_ 盾卫格挡反击卡死的Bug"));
}

public static void add_v0_0_8p3_changes( ArrayList<ChangeInfo> changeInfos ) {
ChangeInfo changes = new ChangeInfo("v0.0.8p3", false, "");
changes.hardlight(Window.TITLE_COLOR);
Expand Down

0 comments on commit 5376b3f

Please sign in to comment.