It is currently 03 Nov 2025, 17:52
   
Text Size

Issue with Card Ability Implementation in MTG Forge

Post MTG Forge Related Programming Questions Here

Moderators: timmermac, Agetian, friarsol, Blacksmith, KrazyTheFox, 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 18 guests

Main Menu

User Menu

Our Partners


Who is online

In total there are 18 users online :: 0 registered, 0 hidden and 18 guests (based on users active over the past 10 minutes)
Most users ever online was 9298 on 10 Oct 2025, 12:54

Users browsing this forum: No registered users and 18 guests

Login Form