It is currently 07 Sep 2025, 12:27
   
Text Size

Mixed suggestions/fixes

Post MTG Forge Related Programming Questions Here

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

Mixed suggestions/fixes

Postby Sloth » 21 Jun 2010, 17:32

Here are some things I found, that might be added:

1. Irini Sengir shouldn't raise the cost of green white enchantments by 4 (obviously, that would make her super broken)
Fix:
Code: Select all
Irini Sengir
2 B B
Legendary Creature Vampire Dwarf
White enchantment spells and green enchantment spells cost 2 more to cast.
2/2
CostChange:All:More:2:Spell:white/green:Enchantment:OnlyOneBonus
2. I found some cards from Rise of the Eldrazi that can be easily added because similar cards exist: cards.txt:
Code: Select all
Vampire Aristocrat
2 B
Creature Vampire Rogue
no text
2/2

Bloodthrone Vampire
1 B
Creature Vampire
no text
1/1

Pestilence Demon
5 B B B
Creature Demon
no text
7/6
Flying
replace
Code: Select all
if(cardName.equals("Nantuko Husk") || cardName.equals("Phyrexian Ghoul"))
in cardfactory.java with:
Code: Select all
if(cardName.equals("Nantuko Husk") || cardName.equals("Phyrexian Ghoul") || cardName.equals("Vampire Aristocrat") || cardName.equals("Bloodthrone Vampire"))
replace
Code: Select all
if(cardName.equals("Pestilence"))
in cardfactory.java with:
Code: Select all
if(cardName.equals("Pestilence") || cardName.equals("Pestilence Demon"))
and
Code: Select all
ability.setDescription("B: Pestilence deals 1 damage to each creature and each player.");
in cardfactory.java with:
Code: Select all
ability.setDescription("B: deals 1 damage to each creature and each player.");
pictures:
Code: Select all
vampire_aristocrat.jpg      http://www.wizards.com/global/images/magic/general/vampire_aristocrat.jpg
bloodthrone_vampire.jpg      http://www.wizards.com/global/images/magic/general/bloodthrone_vampire.jpg
pestilence_demon.jpg      http://www.wizards.com/global/images/magic/general/pestilence_demon.jpg
User avatar
Sloth
Programmer
 
Posts: 3498
Joined: 23 Jun 2009, 19:40
Has thanked: 125 times
Been thanked: 507 times

Re: Mixed suggestions/fixes

Postby Chris H. » 22 Jun 2010, 18:31

I added Vampire Aristocrat and Bloodthrone Vampire. :D

I got Pestilence Demon working, but the AI keeps expending black mana until it kills it's own Pestilence Demon. I tried a couple of things in the AI but was not able to figure out how to solve this problem. :(
User avatar
Chris H.
Forge Moderator
 
Posts: 6320
Joined: 04 Nov 2008, 12:11
Location: Mac OS X Yosemite
Has thanked: 644 times
Been thanked: 643 times

Re: Mixed suggestions/fixes

Postby mtgrares » 22 Jun 2010, 18:34

You can look at the canPlayAI() code for Pestilence. The AI is pretty good with it but not perfect.
mtgrares
DEVELOPER
 
Posts: 1352
Joined: 08 Sep 2008, 22:10
Has thanked: 3 times
Been thanked: 12 times

Re: Mixed suggestions/fixes

Postby Chris H. » 22 Jun 2010, 18:39

mtgrares wrote:You can look at the canPlayAI() code for Pestilence. The AI is pretty good with it but not perfect.
`
I copied the Pestilence code and pasted it into CardFactory_Creatures and renamed the if statement. So, it uses the Pestilence code. I should test Pestilence, the AI code for Pestilence may do the same thing. :mrgreen:
User avatar
Chris H.
Forge Moderator
 
Posts: 6320
Joined: 04 Nov 2008, 12:11
Location: Mac OS X Yosemite
Has thanked: 644 times
Been thanked: 643 times

Re: Mixed suggestions/fixes

Postby mtgrares » 22 Jun 2010, 18:41

Oh well then. Trying to write the AI code for Pestlence is very hard. Sometimes the computer has really killed me with that card.
mtgrares
DEVELOPER
 
Posts: 1352
Joined: 08 Sep 2008, 22:10
Has thanked: 3 times
Been thanked: 12 times

Re: Mixed suggestions/fixes

Postby DennisBergkamp » 22 Jun 2010, 20:35

Change the last line to something like this:

Code: Select all
return AllZone.Computer_Life.getLife() > 2 && !(human.size() == 0 && 0 < computer.size()) &&
          card.getKillDamage() > 1;
Maybe even change it to card.getKillDamage() > 2, to add some extra safety.

If that still doesn't work (the AI might just spend all his black mana right away and not wait for the ability to resolve), add this at the top of canPlayAI()

Code: Select all
SpellAbility sa;
for (int i=0; i<AllZone.Stack.size(); i++)
{
            sa = AllZone.Stack.peek(i);
            if (sa.getSourceCard().equals(card))
                 return false;
}
User avatar
DennisBergkamp
AI Programmer
 
Posts: 2602
Joined: 09 Sep 2008, 15:46
Has thanked: 0 time
Been thanked: 0 time

Re: Mixed suggestions/fixes

Postby Chris H. » 22 Jun 2010, 22:57

DennisBergkamp wrote:Change the last line to something like this:

Code: Select all
return AllZone.Computer_Life.getLife() > 2 && !(human.size() == 0 && 0 < computer.size()) &&
          card.getKillDamage() > 1;
`
OK, I now see what I did wrong. I went back and replaced my dysfunctional AI code with your version and success. Thank you Dennis. =D>

I merged the now working Pestilence Demon into the SVN.
User avatar
Chris H.
Forge Moderator
 
Posts: 6320
Joined: 04 Nov 2008, 12:11
Location: Mac OS X Yosemite
Has thanked: 644 times
Been thanked: 643 times


Return to Developer's Corner

Who is online

Users browsing this forum: No registered users and 51 guests

Main Menu

User Menu

Our Partners


Who is online

In total there are 51 users online :: 0 registered, 0 hidden and 51 guests (based on users active over the past 10 minutes)
Most users ever online was 7303 on 15 Jul 2025, 20:46

Users browsing this forum: No registered users and 51 guests

Login Form