Page 1 of 1

Issue with Card Ability Implementation in MTG Forge

PostPosted: 26 Jun 2024, 05:50
by seleeenaaa112
Hello

I am working on implementing a new card ability in MTG Forge, but I am facing some problem. The ability should trigger when the card enters the battlefield and grant +1/+1 to all creatures the player controls. However ; it doesn't seem to be applying the buff correctly.
Check code snippet I am using:

@Override

public void onEnterBattlefield(final Card card, final Player controller) {
for (Card c : controller.getCreaturesInPlay()) {
c.addPower(1);
c.addToughness(1);
}
}


Has anyone faced a similar issue ? I have checked
Any help would be greatly appreciated!


Thank you