Posts

Showing posts from September, 2020

Linux Generate md5 from command line

`echo` would always return with trailing new line char, therefore pass `-n` to neglect the newline. And so md5sum would received a text from pipe with `-t` option  $ echo -n 123456 | md5sum -t e10adc3949ba59abbe56e057f20f883e  - Have fun ^^

XMage, Adding MutateAbility (2)

Got the ETB triggers, by using the  Ability abilityEquip = new EntersBattlefieldTriggeredAbility( new MutateEffect(Outcome.Mutate) ); abilityEquip.addTarget(targetNonHuman); this.addAbility(abilityEquip); While the MutatesSourceTriggeredAbility failed to trigger.. or probably it is triggered but there is something in the GameImpl that treated it different way?

Xmage, Client does not want to Run, as the Card Repository broken or error

If you experience the Card db or repository failure, then simply Make sure you are in the Mage.Client dir  $ pwd  mage/Mage.Client $ rm -rf db And then re-run the client, $ mvn exec:java -Dexec.mainClass="mage.client.MageFrame" Hope it helps ^^

XMage, Setting Client And Server to TestMode

Mage.Client, go to SessionHandler.java and edit public static boolean isTestMode() { return true; //return session.isTestMode(); } Mage.Server, run is with additional argument set, -testMode=true $ mvn exec:java -Dexec.mainClass="mage.server.Main" -Dexec.args="-testMode=true" Happy testing ^^

XMage, Adding MutateAbility (1)

 Got gp66  forked repo to work on. Trying to test Gemrazer to implement 1. target controlled permanent non-human @@ -2,36 +2,48 @@ package mage.cards.g; import mage.MageInt; import mage.abilities.Ability; import mage.abilities.common.MutatesSourceTriggeredAbility; import mage.abilities.effects.common.DestroyTargetEffect; +import mage.abilities.effects.common.AttachEffect; ... import mage.constants.CardType; +import mage.constants.Outcome; import mage.constants.SubType; import mage.constants.TargetController; import mage.filter.FilterPermanent; import mage.filter.common.FilterArtifactOrEnchantmentPermanent; +import mage.filter.common.FilterControlledCreaturePermanent; import mage.target.TargetPermanent; +import mage.constants.SubType; +import mage.filter.predicate.Predicates; ... public final class Gemrazer extends CardImpl { - private static final FilterPermanent filter + private static final FilterPermanent filter = new FilterArtifactOrEnchantmentP

Eclipse Maven build, recent version of the Java Runtime (class file version 55.0), this version of the Java Runtime only recognizes class file versions up to 52.0`

Error at Eclipse build, "... recent version of the Java Runtime (class file version 55.0), this version of the Java Runtime only recognizes class file versions up to 52.0`" Solution: Find your .m2 repository dir, in my Linux debian 10 is at ~/.m2 $ find . -name "<your-project-org.xxx.xxx.projectname>" $ rm -f org/<your-project-org.xxx.xxx.projectname> <-- usually under the name of your project at the command line of the project,  $ mvn clean $ mvn install -DskipTests=true Reopen eclipse, reference here select Porject -> Maven -> Update Have fun ^^