It is currently 03 Nov 2025, 05:11
   
Text Size

Reflected Mana

Post MTG Forge Related Programming Questions Here

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

Reflected Mana

Postby Sloth » 16 Feb 2013, 15:07

When i tried to add AI support for ManaReflected i encountered some weird stuff (notably that the variable "reflected" in AbilityManaPart was checked 5 times in the code, but was never set). I fixed these in r19654, but you know that ManaReflected is a dangerous beast, so please report when you encounter some weird stuff.
User avatar
Sloth
Programmer
 
Posts: 3498
Joined: 23 Jun 2009, 19:40
Has thanked: 125 times
Been thanked: 507 times

Re: Reflected Mana

Postby Max mtg » 16 Feb 2013, 16:58

A small technical note:
Code: Select all
        else if (sa.getApi().equals(ApiType.ManaReflected)) {
            baseMana = abMana.getExpressChoice();
        }
You may compare Enum members with plain == operator. It is guaranteed that no two instances of any enum member exist.

And I don't understand how it reflected mana works as well.
Single class for single responsibility.
Max mtg
Programmer
 
Posts: 1997
Joined: 02 Jul 2011, 14:26
Has thanked: 173 times
Been thanked: 334 times


Return to Developer's Corner

Who is online

Users browsing this forum: No registered users and 28 guests

Main Menu

User Menu

Our Partners


Who is online

In total there are 28 users online :: 0 registered, 0 hidden and 28 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 28 guests

Login Form