Commit Graph

336 Commits

Author SHA1 Message Date
jendave
a7ee2608e7 delete old code 2011-08-06 10:04:55 +00:00
jendave
58df5b8be6 finish fixing up mill function calls. 2011-08-06 10:04:50 +00:00
jendave
b171b43e9e updated several discard function calls. 2011-08-06 10:04:25 +00:00
jendave
85a9a8754e move AllZone.GameAction.mill to player class 2011-08-06 10:04:20 +00:00
jendave
6891868794 1) move discardUnless functions to Player class
2) update calls
3) remove from GameAction.java
2011-08-06 10:04:14 +00:00
jendave
4b4b52b00e transitioning some discard calls to the Player object. 2011-08-06 10:02:18 +00:00
jendave
c2e91bedd0 Major Phase Overhauling.
- The engine will now stop many places to allow for Priority for both players. 
- The AI now as an entry point, ComputerAI_General.stackResponse(), for responding to things the player does. 
- Most changes outside of Input and Phase classes had to do with condensing code for simpler language
2011-08-06 10:00:15 +00:00
jendave
3a490108d3 1) move majority of discard code to Player classes
2) update calls to use move functions
3) changed code calls from Player.subtractLife to Player.loseLife (and made subtractLife private)
2011-08-06 09:59:28 +00:00
jendave
f40455430a Fix WheneverKeyword not dealing damage to player on multi-target select. 2011-08-06 09:52:45 +00:00
jendave
a6fb0d6735 fix up special case of WheneverKeyword:DrawCard:ControllingPlayer_Opponent 2011-08-06 09:52:39 +00:00
jendave
a0b27588f7 - Conversion to StringBuilder. This finishes GameAction. 2011-08-06 09:49:28 +00:00
jendave
bf3c498ddc add Dirtcowl Wurm (from Tempest) 2011-08-06 09:44:49 +00:00
jendave
e131d1efd5 move more small stuff from GameAction to Player 2011-08-06 09:39:10 +00:00
jendave
9b9b834b58 move scry code from GameAction to Player 2011-08-06 09:39:04 +00:00
jendave
13c52d949e updating calls to GameAction.shuffle (part 4) 2011-08-06 09:38:56 +00:00
jendave
38fcd7cbb4 moved shuffle to Player, deprecated GameAction.shuffle, and redirected to Player 2011-08-06 09:37:58 +00:00
jendave
54f96f92ee updating drawCard calls (part 5) 2011-08-06 09:37:52 +00:00
jendave
cb0a4dab5b translated GameAction.java 2011-08-06 09:37:25 +00:00
jendave
fc530c66d0 updating addAssignedDamage calls. 2011-08-06 09:37:11 +00:00
jendave
5e1f8c3e02 moved drawCard functions to new player class structure. Deprecated and redirected the methods in GameAction.java. I will work on changing all source to call the new functions. 2011-08-06 09:36:49 +00:00
jendave
15a2e6942e update getCards call. 2011-08-06 09:34:35 +00:00
jendave
1a02e4fa30 updating a bunch of calls to makeToken to pass in the Player instead of a Card. 2011-08-06 09:29:48 +00:00
jendave
0cd83a7b74 code cleanup in GameAction.java 2011-08-06 09:29:27 +00:00
jendave
1c53ee1664 more tweaks from converting Player to a class. 2011-08-06 09:29:21 +00:00
jendave
614ce66a03 second pass at moving card damage code to Card.java 2011-08-06 09:29:02 +00:00
jendave
e256ec93ce updating code to call new damage functions in Card.java 2011-08-06 09:28:56 +00:00
jendave
3581b87313 first pass at moving card damage code to Card.java 2011-08-06 09:28:43 +00:00
jendave
dfa71d369e 1) change calls from AllZone.GameAction.addCombatDamage(player, src, num) to player.addCombatDamage(num, src)
2) code cleanup
2011-08-06 09:28:30 +00:00
jendave
71c493cedd - Added Untap as an AbilityFactory
- Added ActivationLimit to SA_Restriction (once AF_Pump is ready we can replace a lot of the hard-coded ActivationLimits with this)
- Added Locust Swarm, Quirion Ranger, Wirewood Symbiote
2011-08-06 09:27:48 +00:00
jendave
5f605da939 more removeFromGame -> Exile 2011-08-06 09:27:30 +00:00
jendave
4d112ed03e we have two functions that do the same thing. GameAction.exile(c) and GameAction.removeFromGame(c). Exile is the new language, so I left this function and updated all calls to use exile(c) 2011-08-06 09:27:22 +00:00
jendave
58181acd5c - Added two new SA_Restrictions (SorcerySpeed, PlayerTurn) and converted Ability.AnyPlayer to Restriction
- Updated Volrath's Dungeon with abCost and Restrictions
- Updated Feral Hydra with AnyPlayer
- Setting ActivatingPlayer before canPlay is checked for Restrictions
- Fixed bugs in Cost_Payment related to Pay Life and AnyPlayer
2011-08-06 09:25:48 +00:00
jendave
2dc420f95f - Added AltCost SVar to handle cards that have an Alternative Casting Cost.
- GameAction.GetSpellCostChange() now takes mana cost as a parameter (to prevent overwriting of AltCost)
- Added Fireblast
- Converted Bringer of the Blue/Green/White Dawn to use AltCost
2011-08-06 09:23:43 +00:00
jendave
104f193796 - Fixed a player string/object bug in the whenever keyword with the DealsDamage trigger. 2011-08-06 09:23:25 +00:00
jendave
1ee7bcc779 Convert player to a class: Player.java
This updates all code that relies on Constant.Player.Human/Computer.

Player specific methods in GameAction.java are marked as deprecatred and redirected to Player.java.

TODO:
1. Incendiary Command needs some looking at.  I couldn't comletely fix it.
2) There is a TODO in the WheneverKeyword code with a very small, specific section commented out.

Everything else has been converted to the best of my knowledge.
	
Due to previously using Strings everywhere, this may introduce some bugs, especially NullPointerExceptions.

Everything uses the object except for the String[][] in Phase.java.  There is a hack in place to make it work, but that shuold probably be converted to a different data structure.
	
See the Developer's Forum thread for more complete info.
2011-08-06 09:23:10 +00:00
jendave
c300b1a248 consolidate abilties of Ali from Cairo, Worship, Fortune Thief and Sustaining Spirit. 2011-08-06 09:21:12 +00:00
jendave
9b62d36f04 "Human" -> Constant.Player.Human; "Computer" -> Constant.Player.Computer 2011-08-06 09:19:48 +00:00
jendave
f8fe1e703d Added:
Adamaro, first to desire
Masumaro, first to live
Quagnoth 
Kavu Titan
Vampiric Dragon
Emperor Crocodile
Seedborn Muse
2011-08-06 09:16:47 +00:00
jendave
8a9e0d83e9 - Made use of the canDamage function in two classes to centralize some code. 2011-08-06 09:09:50 +00:00
jendave
51a2d28f49 - Fixed the typo in "Prevent all combat damage that would be dealt by CARDNAME." 2011-08-06 09:09:23 +00:00
jendave
88047274fb - Several fixes to "Prevent all combat damage that would be dealt to and dealt by CARDNAME.".
- Added Prevent all combat damage that would be dealt dealt by CARDNAME.
- Added 6 cards with combat damage prevention.
2011-08-06 09:09:16 +00:00
jendave
5775aaba0e - Added basic fizzling functionality.
- Added isTargetStillValid which checks the Target class, Auras, and canTarget()
- Added check for TgtZone in Ability_Factory. This will be necessary for targeting cards not on the battlefield.
- Removed unused GameAction.canTarget(player)
2011-08-06 09:06:33 +00:00
jendave
a65bc3d54d - AF_Counters was using the wrong canTarget function.
- Removed GameAction.canTarget so it's not accidentally used again.
2011-08-06 09:06:08 +00:00
jendave
625ae172b5 - Fixed Archon of Redemption.
- Fixed a little bug in the wheneverkeyword.
2011-08-06 09:01:33 +00:00
jendave
d041cf7457 cleanup GameAction.java 2011-08-06 09:00:38 +00:00
jendave
b9683af08e - Removed executePlayerDamageEffects from addCombatDamage, since it gets also called in addDamage. 2011-08-06 08:57:44 +00:00
jendave
46fa4d88f4 fix exception when Scry with lib.size() < scry num 2011-08-06 08:49:24 +00:00
jendave
5a72c6696a Add Worship, Fortune Thief and Sustaining Spirit. 2011-08-06 08:47:48 +00:00
jendave
0a6cb59743 1) GameAction.addCombatDamage now calls addDamage(player, source, damage) instead of PlayerLife.subtractLife()
2) Ali from Cairo check moved to addDamage(...) so things like milling or abLoseLife will still cause a loss
2011-08-06 08:47:38 +00:00
jendave
9566f36b56 - Added "Prevent all combat damage that would be dealt to and dealt by CARDNAME." and
"Prevent all combat damage that would be dealt to CARDNAME." keywords - Added Fog Bank, Guard Gomazoa and Urbog Phantom (ability text on the latter looks a bit funky)
2011-08-06 08:47:16 +00:00