Andu2 / FEH-Mass-Simulator

A mass one-on-one dueling simulator for Fire Emblem Heroes.
50 stars 27 forks source link

Brave Ephraim's Garm doesn't when enemy initiates #170

Closed PrinceGrimm closed 6 years ago

PrinceGrimm commented 6 years ago

Ephraim doesn't get the guaranteed follow-up attack from Garm's effect when enemy initiates while he's buffed. It does work when he initiates though.

ajz003 commented 6 years ago

The code for Garm is present at line 8220 under the comment "// Check for auto follow-up skills" section:

if (this.hasExactly("Garm")){ if (this.buffs.atk != 0 || this.buffs.spd != 0 || this.buffs.def != 0 || this.buffs.res != 0 || (this.hasExactly("Armored Boots") && this.combatStartHp/this.maxHp == 1) || this.moveBuffed ){ thisAttackRank++; thisAttackRankChanged = true; } }

However, it's not there in the "// Check for auto follow-up counters" section between lines 8231-8279

I think this is the issue. This means that Garm doesn't work on defense because it's not registered as an auto follow-up counter. I think this somewhere in the auto follow-up counters section will fix the issue:

if (enemy.hasExactly("Garm")){ if (this.buffs.atk != 0 || this.buffs.spd != 0 || this.buffs.def != 0 || this.buffs.res != 0 || (this.hasExactly("Armored Boots") && this.combatStartHp/this.maxHp == 1) || this.moveBuffed ){ thisAttackRank++; thisAttackRankChanged = true; console.log("YOOOOOOOOOOOOOOOOOOOO " +this); } }

Let me know if this works! (If it doesn't, then this is embarrassing...) I'm just starting to learn JavaScript and I want to see if I can contribute a bit.

jyc8 commented 6 years ago

Thanks! I forgot that counters like Quick Riposte are follow-up attacks too.

@ajz003 It's the correct section, just have to change all the variables to 'enemy'.