v3.1.0: experimenting with adding an icon for sources of dodge
This commit is contained in:
Binary file not shown.
|
Before Width: | Height: | Size: 495 B After Width: | Height: | Size: 514 B |
@@ -590,8 +590,13 @@ public abstract class Char extends Actor {
|
|||||||
} else {
|
} else {
|
||||||
|
|
||||||
if (enemy.sprite != null){
|
if (enemy.sprite != null){
|
||||||
|
if (tuftDodged){
|
||||||
|
enemy.sprite.showStatusWithIcon(CharSprite.NEUTRAL, enemy.defenseVerb(), FloatingText.TUFT);
|
||||||
|
} else {
|
||||||
enemy.sprite.showStatus(CharSprite.NEUTRAL, enemy.defenseVerb());
|
enemy.sprite.showStatus(CharSprite.NEUTRAL, enemy.defenseVerb());
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
tuftDodged = false;
|
||||||
if (visibleFight) {
|
if (visibleFight) {
|
||||||
//TODO enemy.defenseSound? currently miss plays for monks/crab even when they parry
|
//TODO enemy.defenseSound? currently miss plays for monks/crab even when they parry
|
||||||
Sample.INSTANCE.play(Assets.Sounds.MISS);
|
Sample.INSTANCE.play(Assets.Sounds.MISS);
|
||||||
@@ -648,6 +653,7 @@ public abstract class Char extends Actor {
|
|||||||
// + 3%/5%
|
// + 3%/5%
|
||||||
acuRoll *= 1.01f + 0.02f*Dungeon.hero.pointsInTalent(Talent.BLESS);
|
acuRoll *= 1.01f + 0.02f*Dungeon.hero.pointsInTalent(Talent.BLESS);
|
||||||
}
|
}
|
||||||
|
acuRoll *= accMulti;
|
||||||
|
|
||||||
float defRoll = Random.Float( defStat );
|
float defRoll = Random.Float( defStat );
|
||||||
if (defender.buff(Bless.class) != null) defRoll *= 1.25f;
|
if (defender.buff(Bless.class) != null) defRoll *= 1.25f;
|
||||||
@@ -663,11 +669,18 @@ public abstract class Char extends Actor {
|
|||||||
// + 3%/5%
|
// + 3%/5%
|
||||||
defRoll *= 1.01f + 0.02f*Dungeon.hero.pointsInTalent(Talent.BLESS);
|
defRoll *= 1.01f + 0.02f*Dungeon.hero.pointsInTalent(Talent.BLESS);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (defRoll < acuRoll && (defRoll*FerretTuft.evasionMultiplier()) >= acuRoll){
|
||||||
|
tuftDodged = true;
|
||||||
|
}
|
||||||
defRoll *= FerretTuft.evasionMultiplier();
|
defRoll *= FerretTuft.evasionMultiplier();
|
||||||
|
|
||||||
return (acuRoll * accMulti) >= defRoll;
|
return acuRoll >= defRoll;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//TODO this is messy and hacky atm, should consider standardizing this so we can have many 'dodge reasons'
|
||||||
|
private static boolean tuftDodged = false;
|
||||||
|
|
||||||
public int attackSkill( Char target ) {
|
public int attackSkill( Char target ) {
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -77,6 +77,9 @@ public class FloatingText extends RenderedTextBlock {
|
|||||||
public static int GOLD = 23;
|
public static int GOLD = 23;
|
||||||
public static int ENERGY = 24;
|
public static int ENERGY = 24;
|
||||||
|
|
||||||
|
//dodge icons
|
||||||
|
public static int TUFT = 26;
|
||||||
|
|
||||||
private Image icon;
|
private Image icon;
|
||||||
private boolean iconLeft;
|
private boolean iconLeft;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user