addExtrinsicKeyword(String s)
Post MTG Forge Related Programming Questions Here
Moderators: timmermac, Blacksmith, KrazyTheFox, Agetian, friarsol, CCGHQ Admins
addExtrinsicKeyword(String s)
by DennisBergkamp » 17 Feb 2010, 17:39
Is there any reason the code for it looks like this?
Then again, I might have been the one that added this check in the first place, I can't remember...
For now, I will uncomment the if block, however, it might cause problems for certain cards. Joiner Adept and Gemhide Sliver came to mind but after testing they turned out to be working alright (lands and slivers still only had one set of mana abilities, even with multiple of them in play).
- Code: Select all
public void addExtrinsicKeyword(String s) {
if(!getKeyword().contains(s)){
if (s.startsWith("tap: add")) manaAbility.add(new Ability_Mana(this, s)
{
private static final long serialVersionUID = 221124403788942412L;
});
else extrinsicKeyword.add(s);
}
}
Then again, I might have been the one that added this check in the first place, I can't remember...
For now, I will uncomment the if block, however, it might cause problems for certain cards. Joiner Adept and Gemhide Sliver came to mind but after testing they turned out to be working alright (lands and slivers still only had one set of mana abilities, even with multiple of them in play).
-
DennisBergkamp - AI Programmer
- Posts: 2602
- Joined: 09 Sep 2008, 15:46
- Has thanked: 0 time
- Been thanked: 0 time
Re: addExtrinsicKeyword(String s)
by Rob Cashwalker » 17 Feb 2010, 19:22
Yep, you added that.... And made it so that multiple keywords wouldn't stack.
MOST keywords don't stack.
The few that do, are ones that cause triggered abilities, like Exalted or what Lifelink USED to do. To handle this, maybe there needs to be a separate list of keywords that relate to triggered abilities.
MOST keywords don't stack.
The few that do, are ones that cause triggered abilities, like Exalted or what Lifelink USED to do. To handle this, maybe there needs to be a separate list of keywords that relate to triggered abilities.
The Force will be with you, Always.
-
Rob Cashwalker - Programmer
- Posts: 2167
- Joined: 09 Sep 2008, 15:09
- Location: New York
- Has thanked: 5 times
- Been thanked: 40 times
Re: addExtrinsicKeyword(String s)
by DennisBergkamp » 18 Feb 2010, 02:12
Maybe we should add an "addStackingExtrinsicKeyword" method then, since only very few cards (Sidewinder Sliver, ... ) would actually use it. Most of the time we wouldn't want to stack them (looks much better aesthetically).
-
DennisBergkamp - AI Programmer
- Posts: 2602
- Joined: 09 Sep 2008, 15:46
- Has thanked: 0 time
- Been thanked: 0 time
3 posts
• Page 1 of 1
Who is online
Users browsing this forum: No registered users and 88 guests