Re: Theros Spoiler Season
Looks like Theros is up on magiccards.info. I can run my scraper for Oracle later if someone wants to merge the branch back in.
High Quality Resources for Collectible Card Games and Home of the CCGHQ Team
https://www.slightlymagic.net/forum/
https://www.slightlymagic.net/forum/viewtopic.php?f=52&t=11501
Since this only affects a single card/spellAbility, I think we'd need to set some type of metadata on that card (at the same time we mark it with "may be played"), and change the conversion matrix inside of PlayAbility right before the costs begin to be paid. Then, we'd need to make sure things are properly reset after the PlayAbility finishes (successfully or cancelled).Max mtg wrote:Now we have mana color conversion mechanics implemented. What is missing to implement Daxos of Meletis?
Is that the link between remembered exiled card and the ability to spend mana of any color for it?
But I've got enough free time to do this, and should always be able to do it within a day or two of the images being released. Just gave them the details so someone besides me had them.Just tried to script Daxos of Meletis, only HumanPlaySpellAbility was updated. forge.ai.ComputerUtil.handlePlayingSpellAbility(Player, SpellAbility, Game) may be updated for AI.Max mtg wrote:Now we have mana color conversion mechanics implemented. What is missing to implement Daxos of Meletis?
Is that the link between remembered exiled card and the ability to spend mana of any color for it?
### Eclipse Workspace Patch 1.0
#P ForgeLocal
Index: forge-gui/src/main/java/forge/gui/player/HumanPlaySpellAbility.java
===================================================================
--- forge-gui/src/main/java/forge/gui/player/HumanPlaySpellAbility.java (revision 24826)
+++ forge-gui/src/main/java/forge/gui/player/HumanPlaySpellAbility.java (working copy)
@@ -18,7 +18,9 @@
package forge.gui.player;
import com.google.common.collect.Iterables;
+
import forge.card.CardType;
+import forge.card.MagicColor;
import forge.game.Game;
import forge.game.GameObject;
import forge.game.ability.AbilityUtils;
@@ -25,6 +27,7 @@
import forge.game.card.Card;
import forge.game.cost.CostPartMana;
import forge.game.cost.CostPayment;
+import forge.game.mana.ManaPool;
import forge.game.player.Player;
import forge.game.player.PlayerController;
import forge.game.spellability.AbilitySub;
@@ -32,6 +35,7 @@
import forge.game.spellability.SpellAbility;
import forge.game.spellability.TargetRestrictions;
import forge.game.zone.Zone;
+
import org.apache.commons.lang3.StringUtils;
import java.util.ArrayList;
@@ -60,8 +64,12 @@
// used to rollback
Zone fromZone = null;
int zonePosition = 0;
+ final ManaPool manapool = human.getManaPool();
final Card c = this.ability.getHostCard();
+ boolean manaConvertion = ability.isSpell() && c.hasKeyword("May spend mana as though it were mana of any color to cast CARDNAME");
+
+
if (this.ability instanceof Spell && !c.isCopiedSpell()) {
fromZone = game.getZoneOf(c);
if (fromZone != null) {
@@ -73,6 +81,11 @@
// freeze Stack. No abilities should go onto the stack while I'm filling requirements.
game.getStack().freezeStack();
+ if (manaConvertion) {
+ for(String s : MagicColor.Constant.COLORS_AND_COLORLESS) {
+ manapool.adjustColorReplacement(MagicColor.fromName(s), MagicColor.ALL_COLORS, true);
+ }
+ }
// This line makes use of short-circuit evaluation of boolean values, that is each subsequent argument
// is only executed or evaluated if the first argument does not suffice to determine the value of the expression
boolean prerequisitesMet = this.announceValuesLikeX()
@@ -91,6 +104,9 @@
ability.getHostCard().unanimateBestow();
}
}
+ if (manaConvertion) {
+ manapool.restoreColorReplacements();
+ }
return;
}
@@ -109,6 +125,9 @@
if (mayChooseTargets) {
clearTargets(ability);
}
+ if (manaConvertion) {
+ manapool.restoreColorReplacements();
+ }
}
}
Index: forge-gui/res/cardsfolder/d/daxos_of_meletis.txt
===================================================================
--- forge-gui/res/cardsfolder/d/daxos_of_meletis.txt (revision 0)
+++ forge-gui/res/cardsfolder/d/daxos_of_meletis.txt (working copy)
@@ -0,0 +1,16 @@
+Name:Daxos of Meletis
+ManaCost:1 W U
+Types:Legendary Creature Human Soldier
+PT:2/2
+K:CantBeBlockedBy Creature.powerGE3
+T:Mode$ DamageDone | ValidSource$ Card.Self | ValidTarget$ Player | CombatDamage$ True | Execute$ TrigExile | TriggerDescription$ Whenever CARDNAME deals combat damage to a player, exile the top card of that player's library. You gain life equal to that card's converted mana cost. Until end of turn, you may cast that card and you may spend mana as though it were mana of any color to cast it.
+SVar:TrigExile:AB$ Mill | Cost$ 0 | Defined$ TriggeredTarget | NumCards$ 1 | Destination$ Exile | RememberMilled$ True | SubAbility$ DBGainLife
+SVar:DBGainLife:DB$ GainLife | Defined$ You | LifeAmount$ X | References$ X | SubAbility$ DBEffect
+SVar:X:Remembered$CardManaCost
+SVar:DBEffect:DB$ Effect | StaticAbilities$ STPlay,STPlay2 | Triggers$ TriggerCastDoM | SVars$ TrigRemoveSelf | RememberObjects$ Remembered | SubAbility$ DBCleanup
+SVar:STPlay:Mode$ Continuous | EffectZone$ Command | Affected$ Card.IsRemembered+nonLand+YouOwn | AddHiddenKeyword$ May be played & May spend mana as though it were mana of any color to cast CARDNAME | AffectedZone$ Exile | Description$ Until end of turn, you may cast that card and you may spend mana as though it were mana of any color to cast it.
+SVar:STPlay2:Mode$ Continuous | EffectZone$ Command | Affected$ Card.IsRemembered+nonLand+OppOwn | AddHiddenKeyword$ May be played by your opponent & May spend mana as though it were mana of any color to cast CARDNAME | AffectedZone$ Exile
+SVar:TriggerCastDoM:Mode$ SpellCast | ValidCard$ Card.IsRemembered | TriggerZones$ Command | Execute$ TrigRemoveSelf | Static$ True
+SVar:TrigRemoveSelf:DB$ ChangeZone | Defined$ Self | Origin$ Command | Destination$ Exile
+SVar:DBCleanup:DB$ Cleanup | ClearRemembered$ True
+SVar:Picture:http://www.wizards.com/global/images/magic/general/daxos_of_meletis.jpg
\ No newline at end of file