It is currently 04 Jul 2025, 04:36
   
Text Size

Issue with Card Ability Implementation in MTG Forge

Post MTG Forge Related Programming Questions Here

Moderators: timmermac, Blacksmith, KrazyTheFox, Agetian, friarsol, CCGHQ Admins

Issue with Card Ability Implementation in MTG Forge

Postby seleeenaaa112 » 26 Jun 2024, 05:50

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
seleeenaaa112
 
Posts: 6
Joined: 25 Jun 2024, 09:51
Has thanked: 0 time
Been thanked: 0 time

Return to Developer's Corner

Who is online

Users browsing this forum: No registered users and 23 guests

Main Menu

User Menu

Our Partners


Who is online

In total there are 23 users online :: 0 registered, 0 hidden and 23 guests (based on users active over the past 10 minutes)
Most users ever online was 5050 on 26 Jun 2025, 06:02

Users browsing this forum: No registered users and 23 guests

Login Form