Card Contributions
by ubeefx
Moderators: ubeefx, beholder, melvin, ShawnieBoy, Lodici, CCGHQ Admins
Re: Card Contributions
by Lodici » 01 Sep 2014, 12:24
Hold fire PalladiaMors. Your scripts are safely stored in the source control system at http://code.google.com/r/projectfiremin ... ource/list. No need to re-write.
Re: Card Contributions
by mike » 01 Sep 2014, 12:30
Yeah, sorry about the downtime yesterday. Some servers crashed and I had to restore some VMs from backup. The Database was unaffected though so no data was lost there. But since the server who does the pushing of the scripts to the google code repo was down I had to restart those jobs manually today. Which is why they don't appear in the order they were submitted.
Edit:
For future reference. There is a public status page at https://www.firemind.ch/status
which can be used to check if a script has been submitted properly.
Edit:
For future reference. There is a public status page at https://www.firemind.ch/status
which can be used to check if a script has been submitted properly.
Re: Card Contributions
by PalladiaMors » 01 Sep 2014, 13:32
Thanks for the quick reply, guys! Also, don't worry, Mike, I've been using Firemind all the time and this is the first time anything out of the ordinary happened. Plus everything seems to have worked out perfectly after all. Taking advantage of you showing up here, I'd like to ask if you're considering updating Firemind to 1.53 when you have time? 673 new cards is quite significant, and there's stuff in there that's going to see a lot of play! Blood Moon, Maze of Ith, Stroke of Genius, Aetherling in Standard...
- PalladiaMors
- Posts: 343
- Joined: 12 Jul 2014, 17:40
- Has thanked: 36 times
- Been thanked: 22 times
Re: Card Contributions
by mike » 01 Sep 2014, 14:31
Already on it
The worker is already running on 1.53 and the cards/decks should get enabled later today.
The worker is already running on 1.53 and the cards/decks should get enabled later today.
Re: Card Contributions
by PalladiaMors » 01 Sep 2014, 16:52
I was trying to do some cards that require exiling cards from the top of your library as part of the activation cost, such as Royal Herbalist or Whirling Catapult (bit of an effort to raise Alliances' %). The cards load alright but then crash later during play, the crash log points at the cost part of the script as the reason. I was adding both the remove and the move actions, too. Did I make some kind of mistake or did I stumble upon something that can't be done yet?
- PalladiaMors
- Posts: 343
- Joined: 12 Jul 2014, 17:40
- Has thanked: 36 times
- Been thanked: 22 times
Re: Card Contributions
by ShawnieBoy » 01 Sep 2014, 17:52
Do you have any code?PalladiaMors wrote:I was trying to do some cards that require exiling cards from the top of your library as part of the activation cost, such as Royal Herbalist or Whirling Catapult (bit of an effort to raise Alliances' %). The cards load alright but then crash later during play, the crash log points at the cost part of the script as the reason. I was adding both the remove and the move actions, too. Did I make some kind of mistake or did I stumble upon something that can't be done yet?
-
ShawnieBoy - Programmer
- Posts: 601
- Joined: 02 Apr 2012, 22:42
- Location: UK
- Has thanked: 80 times
- Been thanked: 50 times
Re: Card Contributions
by PalladiaMors » 01 Sep 2014, 18:47
Whirling Catapult
java.lang.ClassCastException: magic.model.action.MagicRemoveCardAction cannot be cast to magic.model.event.MagicEvent"
Don't worry about this, it's just me trying to learn a bit more
- Code: Select all
[
new MagicPermanentActivation(
new MagicActivationHints(MagicTiming.Removal),
"Damage"
) {
@Override
public Iterable<MagicEvent> getCostEvent(final MagicPermanent source) {
return [
new MagicPayManaCostEvent(source,"{2}"),
new MagicRemoveCardAction(source.getController().getLibrary().getCardAtTop(),MagicLocationType.OwnersLibrary),
new MagicMoveCardAction(source.getController().getLibrary().getCardAtTop(),MagicLocationType.OwnersLibrary,MagicLocationType.Exile),
new MagicRemoveCardAction(source.getController().getLibrary().getCardAtTop(),MagicLocationType.OwnersLibrary),
new MagicMoveCardAction(source.getController().getLibrary().getCardAtTop(),MagicLocationType.OwnersLibrary,MagicLocationType.Exile)
];
}
@Override
public MagicEvent getPermanentEvent(final MagicPermanent source,final MagicPayedCost payedCost) {
return new MagicEvent(
source,
this,
"SN deals 1 damage to each creature and player."
);
}
@Override
public void executeEvent(final MagicGame game, final MagicEvent event) {
final int amount = 1;
final Collection<MagicPermanent> targets=
game.filterPermanents(event.getPlayer(),MagicTargetFilterFactory.CREATURE_WITHOUT_FLYING);
for (final MagicPermanent target : targets) {
final MagicDamage damage=new MagicDamage(event.getSource(),target,amount);
game.doAction(new MagicDealDamageAction(damage));
}
for (final MagicPlayer player : game.getAPNAP()) {
final MagicDamage damage=new MagicDamage(event.getSource(),player,amount);
game.doAction(new MagicDealDamageAction(damage));
}
}
}
]
java.lang.ClassCastException: magic.model.action.MagicRemoveCardAction cannot be cast to magic.model.event.MagicEvent"
Don't worry about this, it's just me trying to learn a bit more
- PalladiaMors
- Posts: 343
- Joined: 12 Jul 2014, 17:40
- Has thanked: 36 times
- Been thanked: 22 times
Re: Card Contributions
by ShawnieBoy » 03 Sep 2014, 22:41
Always good to test the boundaries Yes, all costs are events, or event-actions. I'll have a look at an exile-mill-self cost-event.PalladiaMors wrote:Whirling CatapultI studied this a bit more an am now pretty much convinced that it won't work, everything that goes in the costs is always "events", I can't find anything at all with "action". Crashes as soon as I get the card into play, crash log: "Exception from controller.runGame: magic.model.action.MagicRemoveCardAction cannot be cast to magic.model.event.MagicEvent
- Code: Select all
[
new MagicPermanentActivation(
new MagicActivationHints(MagicTiming.Removal),
"Damage"
) {
@Override
public Iterable<MagicEvent> getCostEvent(final MagicPermanent source) {
return [
new MagicPayManaCostEvent(source,"{2}"),
new MagicRemoveCardAction(source.getController().getLibrary().getCardAtTop(),MagicLocationType.OwnersLibrary),
new MagicMoveCardAction(source.getController().getLibrary().getCardAtTop(),MagicLocationType.OwnersLibrary,MagicLocationType.Exile),
new MagicRemoveCardAction(source.getController().getLibrary().getCardAtTop(),MagicLocationType.OwnersLibrary),
new MagicMoveCardAction(source.getController().getLibrary().getCardAtTop(),MagicLocationType.OwnersLibrary,MagicLocationType.Exile)
];
}
@Override
public MagicEvent getPermanentEvent(final MagicPermanent source,final MagicPayedCost payedCost) {
return new MagicEvent(
source,
this,
"SN deals 1 damage to each creature and player."
);
}
@Override
public void executeEvent(final MagicGame game, final MagicEvent event) {
final int amount = 1;
final Collection<MagicPermanent> targets=
game.filterPermanents(event.getPlayer(),MagicTargetFilterFactory.CREATURE_WITHOUT_FLYING);
for (final MagicPermanent target : targets) {
final MagicDamage damage=new MagicDamage(event.getSource(),target,amount);
game.doAction(new MagicDealDamageAction(damage));
}
for (final MagicPlayer player : game.getAPNAP()) {
final MagicDamage damage=new MagicDamage(event.getSource(),player,amount);
game.doAction(new MagicDealDamageAction(damage));
}
}
}
]
java.lang.ClassCastException: magic.model.action.MagicRemoveCardAction cannot be cast to magic.model.event.MagicEvent"
Don't worry about this, it's just me trying to learn a bit more
-
ShawnieBoy - Programmer
- Posts: 601
- Joined: 02 Apr 2012, 22:42
- Location: UK
- Has thanked: 80 times
- Been thanked: 50 times
Re: Card Contributions
by ShawnieBoy » 04 Sep 2014, 01:43
Exiling from the top of your library as a cost is now enabled in scripts. Let me know if you find any issues with it.
In groovy its a MagicExileTopLibraryEvent(source,player,int), omit the player if it's for self, int is the amount.
May need to be eagle-eyed: I've had a look at the exile top of library cards, some are a cost, some are part of the effect.
In groovy its a MagicExileTopLibraryEvent(source,player,int), omit the player if it's for self, int is the amount.
May need to be eagle-eyed: I've had a look at the exile top of library cards, some are a cost, some are part of the effect.
-
ShawnieBoy - Programmer
- Posts: 601
- Joined: 02 Apr 2012, 22:42
- Location: UK
- Has thanked: 80 times
- Been thanked: 50 times
Re: Card Contributions
by PalladiaMors » 04 Sep 2014, 01:53
By the way, I wanted to ask about the cycling triggers, since I couldn't find them on the wiki's list. My guess would be WhenCyclesTrigger and WhenOtherCyclesTrigger? I haven't tried those yet but there are some cards that look simple enough even for me if I can get that part right (i.e. Onslaught block staples Astral Slide and Gempalm Incinerator).
- PalladiaMors
- Posts: 343
- Joined: 12 Jul 2014, 17:40
- Has thanked: 36 times
- Been thanked: 22 times
Re: Card Contributions
by ShawnieBoy » 04 Sep 2014, 02:06
Ahh yes, lots of new things to put on/take off that list - thanks for reminding me.
They are WhenCycleTrigger and WhenOtherCycleTrigger
Blissfully small files
They are WhenCycleTrigger and WhenOtherCycleTrigger
Blissfully small files
-
ShawnieBoy - Programmer
- Posts: 601
- Joined: 02 Apr 2012, 22:42
- Location: UK
- Has thanked: 80 times
- Been thanked: 50 times
Re: Card Contributions
by PalladiaMors » 04 Sep 2014, 14:54
Wow, what a disappointment. All that work ended up netting just 3 cards, two of which are terrible. At least Arc-Slogger is a very popular card, but seems like I kind of lead you guys into a false path this time... Sorry about that.
- PalladiaMors
- Posts: 343
- Joined: 12 Jul 2014, 17:40
- Has thanked: 36 times
- Been thanked: 22 times
Re: Card Contributions
by ShawnieBoy » 04 Sep 2014, 16:04
Oh, not at all - the exile top of library appears elsewhere, though not always as a cost. Crumbling Sanctuary, Chaos Harlequin, Primal Surge to name a fewPalladiaMors wrote:Wow, what a disappointment. All that work ended up netting just 3 cards, two of which are terrible. At least Arc-Slogger is a very popular card, but seems like I kind of lead you guys into a false path this time... Sorry about that.
-
ShawnieBoy - Programmer
- Posts: 601
- Joined: 02 Apr 2012, 22:42
- Location: UK
- Has thanked: 80 times
- Been thanked: 50 times
Re: Card Contributions
by PalladiaMors » 06 Sep 2014, 01:43
I've submitted Flickerwisp with MagicTargetHint.Negative, but now noticed that's a massive error. Most of the time, the card seems to be used with your own permanents for enters/leaves battlefield combos.
- PalladiaMors
- Posts: 343
- Joined: 12 Jul 2014, 17:40
- Has thanked: 36 times
- Been thanked: 22 times
Re: Card Contributions
by ShawnieBoy » 06 Sep 2014, 21:04
The exile target picker only assumes it's targeting an opponent's permanent, so calculates values that way. Flicker type cards should really allow for resetting damage and etb tricks, but the vast majority use a negative picker. This is possibly for speeding up the AI.PalladiaMors wrote:I've submitted Flickerwisp with MagicTargetHint.Negative, but now noticed that's a massive error. Most of the time, the card seems to be used with your own permanents for enters/leaves battlefield combos.
Exile target picker also doesn't take into account any etb abilities, unlike the bounce target picker, which may be more appropriate in this case.
-
ShawnieBoy - Programmer
- Posts: 601
- Joined: 02 Apr 2012, 22:42
- Location: UK
- Has thanked: 80 times
- Been thanked: 50 times
Who is online
Users browsing this forum: No registered users and 34 guests