From 0271506646d8c79c0a5654b76d5d9e2c67f74389 Mon Sep 17 00:00:00 2001 From: fireshoes Date: Wed, 20 Jan 2016 12:07:53 -0600 Subject: [PATCH] More OGW token tweaks. --- .../AlliedReinforcements.java | 8 +- .../ChandraFlamecaller.java | 2 + .../sets/oathofthegatewatch/SeedGuardian.java | 229 +++++++++--------- .../permanent/token/EldraziScionToken.java | 11 +- .../game/permanent/token/ZombieToken.java | 2 +- hs_err_pid4700.log | 141 +++++++++++ 6 files changed, 272 insertions(+), 121 deletions(-) create mode 100644 hs_err_pid4700.log diff --git a/Mage.Sets/src/mage/sets/oathofthegatewatch/AlliedReinforcements.java b/Mage.Sets/src/mage/sets/oathofthegatewatch/AlliedReinforcements.java index 3043103f14..4acffed88c 100644 --- a/Mage.Sets/src/mage/sets/oathofthegatewatch/AlliedReinforcements.java +++ b/Mage.Sets/src/mage/sets/oathofthegatewatch/AlliedReinforcements.java @@ -46,7 +46,7 @@ public class AlliedReinforcements extends CardImpl { this.expansionSetCode = "OGW"; // Put two 2/2 white Knight Ally creature tokens onto the battlefield. - this.getSpellAbility().addEffect(new CreateTokenEffect(new KnightToken(), 2)); + this.getSpellAbility().addEffect(new CreateTokenEffect(new KnightAllyToken(), 2)); } public AlliedReinforcements(final AlliedReinforcements card) { @@ -59,10 +59,10 @@ public class AlliedReinforcements extends CardImpl { } } -class KnightToken extends Token { +class KnightAllyToken extends Token { - public KnightToken() { - super("Knight", "2/2 white Knight Ally creature token"); + public KnightAllyToken() { + super("Knight Ally", "2/2 white Knight Ally creature token"); this.setExpansionSetCodeForImage("BFZ"); cardType.add(CardType.CREATURE); color.setWhite(true); diff --git a/Mage.Sets/src/mage/sets/oathofthegatewatch/ChandraFlamecaller.java b/Mage.Sets/src/mage/sets/oathofthegatewatch/ChandraFlamecaller.java index 3e48358942..2742f5deac 100644 --- a/Mage.Sets/src/mage/sets/oathofthegatewatch/ChandraFlamecaller.java +++ b/Mage.Sets/src/mage/sets/oathofthegatewatch/ChandraFlamecaller.java @@ -135,6 +135,8 @@ class ChandraElementalElementalToken extends Token { public ChandraElementalElementalToken() { super("Elemental", "3/1 red Elemental creature tokens with haste"); + setTokenType(1); + setOriginalExpansionSetCode("OGW"); cardType.add(CardType.CREATURE); color.setRed(true); subtype.add("Elemental"); diff --git a/Mage.Sets/src/mage/sets/oathofthegatewatch/SeedGuardian.java b/Mage.Sets/src/mage/sets/oathofthegatewatch/SeedGuardian.java index 7faa78e0e1..0a201204be 100644 --- a/Mage.Sets/src/mage/sets/oathofthegatewatch/SeedGuardian.java +++ b/Mage.Sets/src/mage/sets/oathofthegatewatch/SeedGuardian.java @@ -1,114 +1,115 @@ -/* - * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without modification, are - * permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, this list of - * conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright notice, this list - * of conditions and the following disclaimer in the documentation and/or other materials - * provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND - * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR - * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR - * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON - * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING - * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF - * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - * The views and conclusions contained in the software and documentation are those of the - * authors and should not be interpreted as representing official policies, either expressed - * or implied, of BetaSteward_at_googlemail.com. - */ -package mage.sets.oathofthegatewatch; - -import java.util.UUID; -import mage.MageInt; -import mage.abilities.Ability; -import mage.abilities.common.DiesTriggeredAbility; -import mage.abilities.effects.OneShotEffect; -import mage.abilities.effects.common.CreateTokenEffect; -import mage.abilities.keyword.ReachAbility; -import mage.cards.CardImpl; -import mage.constants.CardType; -import mage.constants.Outcome; -import mage.constants.Rarity; -import mage.filter.common.FilterCreatureCard; -import mage.game.Game; -import mage.game.permanent.token.Token; -import mage.players.Player; - -/** - * - * @author LevelX2 - */ -public class SeedGuardian extends CardImpl { - - public SeedGuardian(UUID ownerId) { - super(ownerId, 143, "Seed Guardian", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{2}{G}{G}"); - this.expansionSetCode = "OGW"; - this.subtype.add("Elemental"); - this.power = new MageInt(3); - this.toughness = new MageInt(4); - - // Reach - this.addAbility(ReachAbility.getInstance()); - // When Seed Guardian dies, put an X/X green Elemental creature token onto the battlefield, where X is the number of creature cards in your graveyard. - this.addAbility(new DiesTriggeredAbility(new SeedGuardianEffect(), false)); - } - - public SeedGuardian(final SeedGuardian card) { - super(card); - } - - @Override - public SeedGuardian copy() { - return new SeedGuardian(this); - } -} - -class SeedGuardianEffect extends OneShotEffect { - - public SeedGuardianEffect() { - super(Outcome.PutCreatureInPlay); - this.staticText = "put an X/X green Elemental creature token onto the battlefield, where X is the number of creature cards in your graveyard"; - } - - public SeedGuardianEffect(final SeedGuardianEffect effect) { - super(effect); - } - - @Override - public SeedGuardianEffect copy() { - return new SeedGuardianEffect(this); - } - - @Override - public boolean apply(Game game, Ability source) { - Player controller = game.getPlayer(source.getControllerId()); - if (controller != null) { - int creaturesInGraveyard = controller.getGraveyard().count(new FilterCreatureCard(), game); - return new CreateTokenEffect(new SeedGuardianToken(creaturesInGraveyard)).apply(game, source); - } - return false; - } -} - -class SeedGuardianToken extends Token { - - public SeedGuardianToken(int xValue) { - super("Elemental", "X/X green Elemental creature token"); - setOriginalExpansionSetCode("OGW"); - cardType.add(CardType.CREATURE); - color.setGreen(true); - subtype.add("Elemental"); - power = new MageInt(xValue); - toughness = new MageInt(xValue); - - } -} +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied, of BetaSteward_at_googlemail.com. + */ +package mage.sets.oathofthegatewatch; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.DiesTriggeredAbility; +import mage.abilities.effects.OneShotEffect; +import mage.abilities.effects.common.CreateTokenEffect; +import mage.abilities.keyword.ReachAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Outcome; +import mage.constants.Rarity; +import mage.filter.common.FilterCreatureCard; +import mage.game.Game; +import mage.game.permanent.token.Token; +import mage.players.Player; + +/** + * + * @author LevelX2 + */ +public class SeedGuardian extends CardImpl { + + public SeedGuardian(UUID ownerId) { + super(ownerId, 143, "Seed Guardian", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{2}{G}{G}"); + this.expansionSetCode = "OGW"; + this.subtype.add("Elemental"); + this.power = new MageInt(3); + this.toughness = new MageInt(4); + + // Reach + this.addAbility(ReachAbility.getInstance()); + // When Seed Guardian dies, put an X/X green Elemental creature token onto the battlefield, where X is the number of creature cards in your graveyard. + this.addAbility(new DiesTriggeredAbility(new SeedGuardianEffect(), false)); + } + + public SeedGuardian(final SeedGuardian card) { + super(card); + } + + @Override + public SeedGuardian copy() { + return new SeedGuardian(this); + } +} + +class SeedGuardianEffect extends OneShotEffect { + + public SeedGuardianEffect() { + super(Outcome.PutCreatureInPlay); + this.staticText = "put an X/X green Elemental creature token onto the battlefield, where X is the number of creature cards in your graveyard"; + } + + public SeedGuardianEffect(final SeedGuardianEffect effect) { + super(effect); + } + + @Override + public SeedGuardianEffect copy() { + return new SeedGuardianEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + Player controller = game.getPlayer(source.getControllerId()); + if (controller != null) { + int creaturesInGraveyard = controller.getGraveyard().count(new FilterCreatureCard(), game); + return new CreateTokenEffect(new SeedGuardianToken(creaturesInGraveyard)).apply(game, source); + } + return false; + } +} + +class SeedGuardianToken extends Token { + + public SeedGuardianToken(int xValue) { + super("Elemental", "X/X green Elemental creature token"); + setTokenType(2); + setOriginalExpansionSetCode("OGW"); + cardType.add(CardType.CREATURE); + color.setGreen(true); + subtype.add("Elemental"); + power = new MageInt(xValue); + toughness = new MageInt(xValue); + + } +} diff --git a/Mage/src/main/java/mage/game/permanent/token/EldraziScionToken.java b/Mage/src/main/java/mage/game/permanent/token/EldraziScionToken.java index b78fe5402a..2406707794 100644 --- a/Mage/src/main/java/mage/game/permanent/token/EldraziScionToken.java +++ b/Mage/src/main/java/mage/game/permanent/token/EldraziScionToken.java @@ -40,6 +40,12 @@ import mage.constants.Zone; * @author fireshoes */ public class EldraziScionToken extends Token { + + final static private List tokenImageSets = new ArrayList<>(); + + static { + tokenImageSets.addAll(Arrays.asList("BFZ", "OGW")); + } public EldraziScionToken() { super("Eldrazi Scion", "1/1 colorless Eldrazi Scion creature token with \"Sacrifice this creature: Add {C} to your mana pool.\""); @@ -49,8 +55,6 @@ public class EldraziScionToken extends Token { power = new MageInt(1); toughness = new MageInt(1); addAbility(new SimpleManaAbility(Zone.BATTLEFIELD, Mana.GenericMana(1), new SacrificeSourceCost())); - setOriginalExpansionSetCode("BFZ"); - } @Override @@ -59,6 +63,9 @@ public class EldraziScionToken extends Token { if (getOriginalExpansionSetCode().equals("BFZ")) { this.setTokenType(new Random().nextInt(3) + 1); // 3 different images } + if (getOriginalExpansionSetCode().equals("OGW")) { + this.setTokenType(new Random().nextInt(6) + 1); // 6 different images + } } public EldraziScionToken(final EldraziScionToken token) { diff --git a/Mage/src/main/java/mage/game/permanent/token/ZombieToken.java b/Mage/src/main/java/mage/game/permanent/token/ZombieToken.java index 28d1e5b4ce..e29f978d25 100644 --- a/Mage/src/main/java/mage/game/permanent/token/ZombieToken.java +++ b/Mage/src/main/java/mage/game/permanent/token/ZombieToken.java @@ -43,7 +43,7 @@ public class ZombieToken extends Token { final static private List tokenImageSets = new ArrayList<>(); static { - tokenImageSets.addAll(Arrays.asList("10E", "M10", "M11", "M12", "M13", "M14", "M15", "MBS", "ALA", "ISD", "C14", "C15", "CNS", "MMA", "BNG", "KTK", "DTK", "ORI")); + tokenImageSets.addAll(Arrays.asList("10E", "M10", "M11", "M12", "M13", "M14", "M15", "MBS", "ALA", "ISD", "C14", "C15", "CNS", "MMA", "BNG", "KTK", "DTK", "ORI", "OGW)); } public ZombieToken() { diff --git a/hs_err_pid4700.log b/hs_err_pid4700.log new file mode 100644 index 0000000000..e8d083da24 --- /dev/null +++ b/hs_err_pid4700.log @@ -0,0 +1,141 @@ +# +# There is insufficient memory for the Java Runtime Environment to continue. +# Native memory allocation (malloc) failed to allocate 1048576 bytes for AllocateHeap +# Possible reasons: +# The system is out of physical RAM or swap space +# In 32 bit mode, the process size limit was hit +# Possible solutions: +# Reduce memory load on the system +# Increase physical memory or swap space +# Check if swap backing store is full +# Use 64 bit Java on a 64 bit OS +# Decrease Java heap size (-Xmx/-Xms) +# Decrease number of Java threads +# Decrease Java thread stack sizes (-Xss) +# Set larger code cache with -XX:ReservedCodeCacheSize= +# This output file may be truncated or incomplete. +# +# Out of Memory Error (memory/allocation.inline.hpp:61), pid=4700, tid=4912 +# +# JRE version: (7.0_71-b14) (build ) +# Java VM: Java HotSpot(TM) 64-Bit Server VM (24.71-b01 mixed mode windows-amd64 compressed oops) +# Failed to write core dump. Minidumps are not enabled by default on client versions of Windows +# + +--------------- T H R E A D --------------- + +Current thread (0x000000000223f000): JavaThread "Unknown thread" [_thread_in_vm, id=4912, stack(0x00000000025b0000,0x00000000026b0000)] + +Stack: [0x00000000025b0000,0x00000000026b0000] +[error occurred during error reporting (printing stack bounds), id 0xc0000005] + + +--------------- P R O C E S S --------------- + +Java Threads: ( => current thread ) + +Other Threads: + +=>0x000000000223f000 (exited) JavaThread "Unknown thread" [_thread_in_vm, id=4912, stack(0x00000000025b0000,0x00000000026b0000)] + +VM state:not at safepoint (normal execution) + +VM Mutex/Monitor currently owned by a thread: None + +Heap + PSYoungGen total 612352K, used 10506K [0x00000007d5500000, 0x0000000800000000, 0x0000000800000000) + eden space 525312K, 2% used [0x00000007d5500000,0x00000007d5f42948,0x00000007f5600000) + from space 87040K, 0% used [0x00000007fab00000,0x00000007fab00000,0x0000000800000000) + to space 87040K, 0% used [0x00000007f5600000,0x00000007f5600000,0x00000007fab00000) + ParOldGen total 1398272K, used 0K [0x000000077ff80000, 0x00000007d5500000, 0x00000007d5500000) + object space 1398272K, 0% used [0x000000077ff80000,0x000000077ff80000,0x00000007d5500000) + PSPermGen total 21504K, used 694K [0x000000077ad80000, 0x000000077c280000, 0x000000077ff80000) + object space 21504K, 3% used [0x000000077ad80000,0x000000077ae2d9f8,0x000000077c280000) + +Card table byte_map: [0x00000000056b0000,0x0000000005ae0000] byte_map_base: 0x0000000001ad9400 + +Polling page: 0x0000000000240000 + +Code Cache [0x00000000026b0000, 0x0000000002920000, 0x00000000056b0000) + total_blobs=37 nmethods=0 adapters=20 free_code_cache=48890Kb largest_free_block=50063104 + +Compilation events (0 events): +No events + +GC Heap History (0 events): +No events + +Deoptimization events (0 events): +No events + +Internal exceptions (0 events): +No events + +Events (10 events): +Event: 0.029 loading class 0x00000000022bed40 +Event: 0.029 loading class 0x00000000022bed40 done +Event: 0.029 loading class 0x00000000022bed90 +Event: 0.029 loading class 0x00000000022bed90 done +Event: 0.029 loading class 0x00000000022bede0 +Event: 0.029 loading class 0x00000000022bede0 done +Event: 0.030 loading class 0x00000000022bfb40 +Event: 0.030 loading class 0x00000000022bfb40 done +Event: 0.030 loading class 0x00000000022bf760 +Event: 0.030 loading class 0x00000000022bf760 done + + +Dynamic libraries: +0x000000013f320000 - 0x000000013f353000 C:\Program Files\Java\jdk1.7.0_71\bin\java.exe +0x00000000770c0000 - 0x0000000077269000 C:\Windows\SYSTEM32\ntdll.dll +0x0000000076ea0000 - 0x0000000076fbf000 C:\Windows\system32\kernel32.dll +0x000007fefd170000 - 0x000007fefd1dc000 C:\Windows\system32\KERNELBASE.dll +0x000007fefd7c0000 - 0x000007fefd89b000 C:\Windows\system32\ADVAPI32.dll +0x000007feff300000 - 0x000007feff39f000 C:\Windows\system32\msvcrt.dll +0x000007fefe7e0000 - 0x000007fefe7ff000 C:\Windows\SYSTEM32\sechost.dll +0x000007fefd8a0000 - 0x000007fefd9cd000 C:\Windows\system32\RPCRT4.dll +0x0000000076fc0000 - 0x00000000770ba000 C:\Windows\system32\USER32.dll +0x000007fefd230000 - 0x000007fefd297000 C:\Windows\system32\GDI32.dll +0x000007fefef50000 - 0x000007fefef5e000 C:\Windows\system32\LPK.dll +0x000007feff230000 - 0x000007feff2f9000 C:\Windows\system32\USP10.dll +0x000007fefb490000 - 0x000007fefb684000 C:\Windows\WinSxS\amd64_microsoft.windows.common-controls_6595b64144ccf1df_6.0.7601.18837_none_fa3b1e3d17594757\COMCTL32.dll +0x000007fefe760000 - 0x000007fefe7d1000 C:\Windows\system32\SHLWAPI.dll +0x000007feff3a0000 - 0x000007feff3ce000 C:\Windows\system32\IMM32.DLL +0x000007fefe9f0000 - 0x000007fefeaf9000 C:\Windows\system32\MSCTF.dll +0x000000006ab40000 - 0x000000006ac12000 C:\Program Files\Java\jdk1.7.0_71\jre\bin\msvcr100.dll +0x0000000067b10000 - 0x00000000682e3000 C:\Program Files\Java\jdk1.7.0_71\jre\bin\server\jvm.dll +0x000007fefa970000 - 0x000007fefa979000 C:\Windows\system32\WSOCK32.dll +0x000007fefd690000 - 0x000007fefd6dd000 C:\Windows\system32\WS2_32.dll +0x000007fefe9e0000 - 0x000007fefe9e8000 C:\Windows\system32\NSI.dll +0x000007fefaf60000 - 0x000007fefaf9b000 C:\Windows\system32\WINMM.dll +0x0000000077290000 - 0x0000000077297000 C:\Windows\system32\PSAPI.DLL +0x000000006f510000 - 0x000000006f51f000 C:\Program Files\Java\jdk1.7.0_71\jre\bin\verify.dll +0x000000006c820000 - 0x000000006c848000 C:\Program Files\Java\jdk1.7.0_71\jre\bin\java.dll +0x000000006c860000 - 0x000000006c875000 C:\Program Files\Java\jdk1.7.0_71\jre\bin\zip.dll + +VM Arguments: +jvm_args: -Xms2048m -Xmx2048m -Dclassworlds.conf=C:\Program Files\NetBeans 8.0.2\java\maven\bin\m2.conf -Dmaven.home=C:\Program Files\NetBeans 8.0.2\java\maven +java_command: org.codehaus.plexus.classworlds.launcher.Launcher -Dmaven.ext.class.path=C:\Users\fireshoes\AppData\Roaming\NetBeans\8.0.2\maven-nblib\netbeans-eventspy.jar -Dfile.encoding=UTF-8 clean install +Launcher Type: SUN_STANDARD + +Environment Variables: +JAVA_HOME=C:\Program Files\Java\jdk1.7.0_71 +PATH=c:\Program FIles\Apache Software Foundation\apache-maven-3.2.3\bin;C:\ProgramData\Oracle\Java\javapath;C:\Program Files (x86)\AMD APP\bin\x86_64;C:\Program Files (x86)\AMD APP\bin\x86;C:\Program Files\Common Files\Microsoft Shared\Windows Live;C:\Program Files (x86)\Common Files\Microsoft Shared\Windows Live;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\Windows Live\Shared;C:\Program Files (x86)\ATI Technologies\ATI.ACE\Core-Static;C:\Program FIles\Java\jdk1.7.0_71\bin;C:\Strawberry\c\bin;C:\Strawberry\perl\site\bin;C:\Strawberry\perl\bin;C:\Program Files (x86)\Git\cmd;C:\apache-maven-3.3.9-src\apache-maven-3.3.9\apache-maven\src +USERNAME=fireshoes +OS=Windows_NT +PROCESSOR_IDENTIFIER=AMD64 Family 18 Model 1 Stepping 0, AuthenticAMD + + + +--------------- S Y S T E M --------------- + +OS: Windows 7 , 64 bit Build 7601 Service Pack 1 + +CPU:total 4 (4 cores per cpu, 1 threads per core) family 18 model 1 stepping 0, cmov, cx8, fxsr, mmx, sse, sse2, sse3, popcnt, mmxext, 3dnowpref, lzcnt, sse4a, tsc, tscinvbit, tscinv + +Memory: 4k page, physical 3559120k(796500k free), swap 7967852k(857396k free) + +vm_info: Java HotSpot(TM) 64-Bit Server VM (24.71-b01) for windows-amd64 JRE (1.7.0_71-b14), built on Sep 26 2014 16:16:12 by "java_re" with unknown MS VC++:1600 + +time: Wed Jan 20 09:21:37 2016 +elapsed time: 0 seconds +