Mixed suggestions/fixes
Post MTG Forge Related Programming Questions Here
	Moderators: timmermac, Agetian, friarsol, Blacksmith, KrazyTheFox, CCGHQ Admins
			7 posts
			 • Page 1 of 1
		
	
Mixed suggestions/fixes
 by Sloth » 21 Jun 2010, 17:32
by 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:
			
		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
- 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
- Code: Select all
- if(cardName.equals("Nantuko Husk") || cardName.equals("Phyrexian Ghoul"))
- Code: Select all
- if(cardName.equals("Nantuko Husk") || cardName.equals("Phyrexian Ghoul") || cardName.equals("Vampire Aristocrat") || cardName.equals("Bloodthrone Vampire"))
- Code: Select all
- if(cardName.equals("Pestilence"))
- Code: Select all
- if(cardName.equals("Pestilence") || cardName.equals("Pestilence Demon"))
- Code: Select all
- ability.setDescription("B: Pestilence deals 1 damage to each creature and each player.");
- Code: Select all
- ability.setDescription("B: deals 1 damage to each creature and each player.");
- 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
- 
				 
 Sloth
- Programmer
- Posts: 3498
- Joined: 23 Jun 2009, 19:40
- Has thanked: 125 times
- Been thanked: 507 times
Re: Mixed suggestions/fixes
 by Chris H. » 22 Jun 2010, 18:31
by Chris H. » 22 Jun 2010, 18:31 
I added Vampire Aristocrat and Bloodthrone Vampire.   
 
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.
			
		 
 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.

- 
				 
 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
 by mtgrares » 22 Jun 2010, 18:34
by 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
 by Chris H. » 22 Jun 2010, 18:39
by 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.

- 
				 
 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
 by mtgrares » 22 Jun 2010, 18:41
by 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
 by DennisBergkamp » 22 Jun 2010, 20:35
by DennisBergkamp » 22 Jun 2010, 20:35 
Change the last line to something like this:
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
- return AllZone.Computer_Life.getLife() > 2 && !(human.size() == 0 && 0 < computer.size()) &&
 card.getKillDamage() > 1;
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;
 }
- 
				 
 DennisBergkamp
- AI Programmer
- Posts: 2602
- Joined: 09 Sep 2008, 15:46
- Has thanked: 0 time
- Been thanked: 0 time
Re: Mixed suggestions/fixes
 by Chris H. » 22 Jun 2010, 22:57
by 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.
 
 I merged the now working Pestilence Demon into the SVN.
- 
				 
 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
			7 posts
			 • Page 1 of 1
		
	
Who is online
Users browsing this forum: No registered users and 17 guests
