Here I am again with other (broken) Slivers, asking for guidance and help.
I've included the crash report for each card:
Pulmonic_Sliver.txt
- Code: Select all
name=Pulmonic Sliver
url=http://magiccards.info/ts/en/36.html
image=http://magiccards.info/scans/en/ts/36.jpg
value=4.170
rarity=R
type=Creature
subtype=Sliver
cost={3}{W}{W}
pt=3/3
ability=lord all sliver creatures have flying
timing=main
static=all
requires_groovy_code
Pulmonic_Sliver.groovy
- Code: Select all
[
new MagicWhenDiesTrigger() {
@Override
public MagicEvent getEvent(final MagicPermanent permanent) {
return (permanent.hasSubType(MagicSubType.Sliver)) ?
new MagicEvent(
permanent,
new MagicSimpleMayChoice(
MagicSimpleMayChoice.PLAY_TOKEN,
1,
MagicSimpleMayChoice.DEFAULT_NONE
),
this,
"you may put SN on top of its owner's library."
):
MagicEvent.NONE;
}
@Override
public void executeEvent(final MagicGame game, final MagicEvent event) {
if (event.isYes()) {
game.doAction(new MagicRemoveFromPlayAction(event.getSource(),MagicLocationType.TopOfOwnersLibrary));
}
}
}
]
Pulmonic Sliver crash report:
CRASH REPORT FOR MAGARENA THREAD Thread[AWT-EventQueue-0,6,main]
CREATED ON 2013/09/23 19:35:55
MAGARENA VERSION 1.41, JRE 1.7.0_25, OS Windows 7_6.1 x86
Turn : 1 Phase : Mulligan Step : Begin Player : Jericho Score : 0
0] Player : Jericho Life : 20 Delayed : Total=0
1] Player : Computer Life : 20 Delayed : Total=0
Stack : 0
Score = 0
Exception from controller.runGame: startup failed:
C:\Users\Torre\Desktop\Magarena-1.41\Magarena\scripts\Pulmonic_Sliver.groovy: 22: [Static type checking] - Cannot find matching method magic.model.action.MagicRemoveFromPlayAction#<init>(magic.model.MagicSource, magic.model.MagicLocationType). Please check if the declared type is right and if the method exists.@ line 22, column 31.
game.doAction(new MagicRemoveFromPlayAction(event.getSource(), MagicLocationType.TopOfOwnersLibrary));
1 error
org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed:
C:\Users\Torre\Desktop\Magarena-1.41\Magarena\scripts\Pulmonic_Sliver.groovy: 22: [Static type checking] - Cannot find matching method magic.model.action.MagicRemoveFromPlayAction#<init>(magic.model.MagicSource, magic.model.MagicLocationType). Please check if the declared type is right and if the method exists.@ line 22, column 31.
game.doAction(new MagicRemoveFromPlayAction( event.getSource(), MagicLocationType.TopOfOwnersLibrary));
Psionic_Sliver.txt
- Code: Select all
name=Psionic Sliver
url=http://magiccards.info/ts/en/72.html
image=http://magiccards.info/scans/en/ts/72.jpg
value=3.667
rarity=C
type=Creature
subtype=Sliver
cost={4}{U}
pt=2/2
static=all
timing=main
requires_groovy_code
Psionic_Sliver.groovy
- Code: Select all
def PsionicDamage = new MagicPermanentActivation(
new MagicActivationHints(MagicTiming.Pump),
"Psionic"
) {
@Override
public Iterable<MagicEvent> getCostEvent(final MagicPermanent source) {
return [ new MagicTapEvent(source)];
}
@Override
public MagicEvent getPermanentEvent(final MagicPermanent source, final MagicPayedCost payedCost) {
return new MagicEvent(
source,
MagicTargetChoice.NEG_TARGET_CREATURE_OR_PLAYER,
new MagicDamageTargetPicker(2),
this,
"SN deals 2 damage to target creature or player\$ and 3 damage to itself."
);
}
@Override
public void executeEvent(final MagicGame game, final MagicEvent event) {
final MagicSource source=event.getSource();
event.processTarget(game,new MagicTargetAction() {
public void doAction(final MagicTarget target) {
final MagicDamage damage1=new MagicDamage(source,target,2);
game.doAction(new MagicDealDamageAction(damage1));
final MagicDamage damage2=new MagicDamage(source,source,3);
game.doAction(new MagicDealDamageAction(damage2));
}
});
}
};
[
new MagicStatic(
MagicLayer.Ability,
MagicTargetFilter.TARGET_SLIVER
) {
@Override
public void modAbilityFlags(final MagicPermanent source,final MagicPermanent permanent,final Set<MagicAbility> flags) {
permanent.addAbility(PsionicDamage);
}
}
]
Psionic Sliver crash report:
CRASH REPORT FOR MAGARENA THREAD Thread[AWT-EventQueue-0,6,main]
CREATED ON 2013/09/23 19:28:22
MAGARENA VERSION 1.41, JRE 1.7.0_25, OS Windows 7_6.1 x86
Turn : 1 Phase : Mulligan Step : Begin Player : Jericho Score : 0
0] Player : Jericho Life : 20 Delayed : Total=0
1] Player : Computer Life : 20 Delayed : Total=0
Stack : 0
Score = 0
Exception from controller.runGame: startup failed:
C:\Users\Torre\Desktop\Magarena-1.41\Magarena\scripts\Psionic_Sliver.groovy: 30: [Static type checking] - Cannot find matching method magic.model.MagicDamage#<init>(magic.model.MagicSource, magic.model.MagicSource, int). Please check if the declared type is right and if the method exists.
@ line 30, column 49.
final MagicDamage damage2 = new MagicD
^
1 error
org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed:
C:\Users\Torre\Desktop\Magarena-1.41\Magarena\scripts\Psionic_Sliver.groovy: 30: [Static type checking] - Cannot find matching method magic.model.MagicDamage#<init>(magic.model.MagicSource, magic.model.MagicSource, int). Please check if the declared type is right and if the method exists.
@ line 30, column 49.
final MagicDamage damage2 = new MagicD
Forbidden_Orchard.txt
- Code: Select all
name=Forbidden Orchard
url=http://magiccards.info/v12/en/6.html
image=http://magiccards.info/scans/en/v12/6.jpg
value=4.375
rarity=M
type=Land
mana=b1g1r1u1w1
timing=land
requires_groovy_code
Forbidden_Orchard.groovy
- Code: Select all
[
new MagicManaActivation(
MagicManaType.ALL_TYPES,
2
) {
@Override
public Iterable<MagicEvent> getCostEvent(final MagicPermanent permanent) {
return [
new MagicTapEvent(permanent)
];
}
@Override
public MagicEvent getPermanentEvent(final MagicPermanent source, final MagicPayedCost payedCost) {
return new MagicEvent(
permanent,
MagicTargetChoice.TARGET_OPPONENT,
this,
"Target opponent\$ puts a 1/1 colorless Spirit creature token onto the battlefield."
);
}
@Override
public void executeEvent(final MagicGame game, final MagicEvent event) {
event.processTargetPlayer(game,new MagicPlayerAction() {
public void doAction(final MagicPlayer player) {
game.doAction(new MagicPlayTokenAction(
player,
TokenCardDefinitions.get("Spirit1")
));
}
});
}
}
]
Forbidden Orchard crash report:
CRASH REPORT FOR MAGARENA THREAD Thread[AWT-EventQueue-0,6,main]
CREATED ON 2013/09/23 19:41:06
MAGARENA VERSION 1.41, JRE 1.7.0_25, OS Windows 7_6.1 x86
Turn : 1 Phase : Mulligan Step : Begin Player : Jericho Score : 0
0] Player : Jericho Life : 20 Delayed : Total=0
1] Player : Computer Life : 20 Delayed : Total=0
Stack : 0
Score = 0
Exception from controller.runGame: startup failed:
C:\Users\Torre\Desktop\Magarena-1.41\Magarena\scripts\Forbidden_Orchard.groovy: 15: [Static type checking] - The variable [permanent] is undeclared.
@ line 15, column 5.
permanent,
^
C:\Users\Torre\Desktop\Magarena-1.41\Magarena\scripts\Forbidden_Orchard.groovy: 14: [Static type checking] - Cannot find matching method magic.model.event.MagicEvent#<init>(java.lang.Object, magic.model.choice.MagicTargetChoice, Forbidden_Orchard$1, java.lang.String). Please check if the declared type is right and if the method exists.
@ line 14, column 20.
return new MagicEvent(
^
2 errors
org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed:
C:\Users\Torre\Desktop\Magarena-1.41\Magarena\scripts\Forbidden_Orchard.groovy: 15: [Static type checking] - The variable [permanent] is undeclared.
@ line 15, column 5.
permanent,
^
C:\Users\Torre\Desktop\Magarena-1.41\Magarena\scripts\Forbidden_Orchard.groovy: 14: [Static type checking] - Cannot find matching method magic.model.event.MagicEvent#<init>(java.lang.Object, magic.model.choice.MagicTargetChoice, Forbidden_Orchard$1, java.lang.String). Please check if the declared type is right and if the method exists.
@ line 14, column 20.
return new MagicEvent(
^
The one that really puzzles me is Psionic, it shold work, after all it's nearly identical to
Goblin Artillery, it only changes the target of the 2nd damage...