Few changes.

This commit is contained in:
marcins78@gmail.com
2011-10-04 18:56:11 +00:00
parent 61ac906b13
commit 69811ff65e
11 changed files with 155 additions and 32 deletions

View File

@@ -25,4 +25,9 @@ public class TransferPermanentAction extends ActivateCardAction {
}
});
}
@Override
public String getText(LotroGame game) {
return "Transfer " + getActionSource().getBlueprint().getName();
}
}

View File

@@ -37,9 +37,18 @@ public class Card1_179 extends AbstractMinion {
@Override
public List<OptionalTriggerAction> getOptionalAfterTriggers(final String playerId, final LotroGame game, EffectResult effectResult, final PhysicalCard self) {
if (PlayConditions.played(game.getGameState(), game.getModifiersQuerying(), effectResult, Filters.sameCard(self))) {
final Filter additionalAttachmentFilter = Filters.and(Filters.owner(self.getOwner()), Filters.culture(Culture.MORIA), Filters.race(Race.ORC));
final Filter additionalAttachmentFilter = Filters.and(Filters.owner(self.getOwner()), Filters.culture(Culture.MORIA), Filters.race(Race.ORC));
if (PlayConditions.played(game.getGameState(), game.getModifiersQuerying(), effectResult, Filters.sameCard(self))
&& Filters.filter(game.getGameState().getDiscard(playerId), game.getGameState(), game.getModifiersQuerying(), Filters.weapon(),
new Filter() {
@Override
public boolean accepts(GameState gameState, ModifiersQuerying modifiersQuerying, PhysicalCard physicalCard) {
AbstractAttachable weapon = (AbstractAttachable) physicalCard.getBlueprint();
return weapon.checkPlayRequirements(playerId, game, physicalCard, additionalAttachmentFilter, 0);
}
}, Filters.playable(game)).size() > 0
) {
OptionalTriggerAction action = new OptionalTriggerAction(self);
action.appendEffect(
new ChooseArbitraryCardsEffect(playerId, "Choose card to play", game.getGameState().getDiscard(playerId),

View File

@@ -13,9 +13,9 @@ import java.util.Collection;
import java.util.Set;
public abstract class ChooseActiveCardsEffect extends AbstractEffect {
private PhysicalCard _source;
private final PhysicalCard _source;
private final String _playerId;
private final String _choiceText;
private String _choiceText;
private final int _minimum;
private final int _maximum;
private final Filter[] _filters;
@@ -29,6 +29,10 @@ public abstract class ChooseActiveCardsEffect extends AbstractEffect {
_filters = filters;
}
public void setChoiceText(String choiceText) {
_choiceText = choiceText;
}
protected Filter getExtraFilter() {
return Filters.any();
}

View File

@@ -37,16 +37,17 @@ public class FellowshipPlayerAssignsArcheryDamageGameProcess implements GameProc
}
});
RequiredTriggerAction action = new RequiredTriggerAction(null);
RequiredTriggerAction action = new RequiredTriggerAction(null) {
@Override
public String getText(LotroGame game) {
return "Archery fire";
}
};
for (int i = 0; i < _woundsToAssign; i++) {
final int woundsLeft = _woundsToAssign - i;
action.appendEffect(
new ChooseAndWoundCharactersEffect(action, _game.getGameState().getCurrentPlayerId(), 1, 1, filter) {
@Override
public String getText(LotroGame game) {
return "Choose character to assign archery wound to - remaining wounds: " + woundsLeft;
}
});
ChooseAndWoundCharactersEffect woundCharacter = new ChooseAndWoundCharactersEffect(action, _game.getGameState().getCurrentPlayerId(), 1, 1, filter);
woundCharacter.setChoiceText("Choose character to assign archery wound to - remaining wounds: " + woundsLeft);
action.appendEffect(woundCharacter);
}
_game.getActionsEnvironment().addActionToStack(action);

View File

@@ -28,16 +28,17 @@ public class ShadowPlayerAssignsArcheryDamageGameProcess implements GameProcess
if (_woundsToAssign > 0) {
Filter filter = Filters.and(Filters.type(CardType.MINION), Filters.owner(_playerId));
RequiredTriggerAction action = new RequiredTriggerAction(null);
RequiredTriggerAction action = new RequiredTriggerAction(null) {
@Override
public String getText(LotroGame game) {
return "Archery fire";
}
};
for (int i = 0; i < _woundsToAssign; i++) {
final int woundsLeft = _woundsToAssign - i;
action.appendEffect(
new ChooseAndWoundCharactersEffect(action, _playerId, 1, 1, filter) {
@Override
public String getText(LotroGame game) {
return "Choose minion to assign archery wound to - remaining wounds: " + woundsLeft;
}
});
ChooseAndWoundCharactersEffect woundCharacter = new ChooseAndWoundCharactersEffect(action, _playerId, 1, 1, filter);
woundCharacter.setChoiceText("Choose minion to assign archery wound to - remaining wounds: " + woundsLeft);
action.appendEffect(woundCharacter);
}
_game.getActionsEnvironment().addActionToStack(action);

View File

@@ -39,7 +39,12 @@ public class PlayoutSkirmishesGameProcess implements GameProcess {
for (Skirmish assignment : assignments)
fps.add(assignment.getFellowshipCharacter());
RequiredTriggerAction chooseNextSkirmishAction = new RequiredTriggerAction(null);
RequiredTriggerAction chooseNextSkirmishAction = new RequiredTriggerAction(null) {
@Override
public String getText(LotroGame game) {
return "Choosing next skirmish to play out";
}
};
chooseNextSkirmishAction.appendEffect(
new ChooseActiveCardEffect(null, gameState.getCurrentPlayerId(), "Choose next skirmish to resolve", Filters.in(fps)) {
@Override

View File

@@ -40,7 +40,12 @@ public class CharacterDeathRule {
deadCharacters.add(character);
if (deadCharacters.size() > 0) {
RequiredTriggerAction action = new RequiredTriggerAction(null);
RequiredTriggerAction action = new RequiredTriggerAction(null) {
@Override
public String getText(LotroGame game) {
return "Character(s) death";
}
};
action.appendEffect(
new KillEffect(deadCharacters));
return Collections.singletonList(action);

View File

@@ -45,7 +45,12 @@ public class ResolveSkirmishRule {
List<PhysicalCard> losers = skirmishResult.getLosers();
RequiredTriggerAction action = new RequiredTriggerAction(null);
RequiredTriggerAction action = new RequiredTriggerAction(null) {
@Override
public String getText(LotroGame game) {
return "Resolving skirmish";
}
};
for (int i = 0; i < dmg; i++) {
action.appendEffect(
new WoundCharactersEffect(winners, Filters.in(losers)));
@@ -56,7 +61,12 @@ public class ResolveSkirmishRule {
OverwhelmSkirmishResult skirmishResult = (OverwhelmSkirmishResult) effectResult;
List<PhysicalCard> losers = new LinkedList<PhysicalCard>(skirmishResult.getLosers());
RequiredTriggerAction action = new RequiredTriggerAction(null);
RequiredTriggerAction action = new RequiredTriggerAction(null) {
@Override
public String getText(LotroGame game) {
return "Resolving skirmish";
}
};
action.appendEffect(new KillEffect(losers));
return Collections.singletonList(action);

View File

@@ -28,16 +28,17 @@ public class SanctuaryRule {
public List<? extends Action> getRequiredAfterTriggers(LotroGame game, EffectResult effectResult) {
if (effectResult.getType() == EffectResult.Type.START_OF_TURN
&& game.getModifiersQuerying().hasKeyword(game.getGameState(), game.getGameState().getCurrentSite(), Keyword.SANCTUARY)) {
RequiredTriggerAction action = new RequiredTriggerAction(null);
RequiredTriggerAction action = new RequiredTriggerAction(null) {
@Override
public String getText(LotroGame game) {
return "Sanctuary healing";
}
};
for (int i = 0; i < 5; i++) {
final int remainingHeals = 5 - i;
action.appendEffect(
new ChooseAndHealCharactersEffect(action, game.getGameState().getCurrentPlayerId(), 0, 1, Filters.type(CardType.COMPANION)) {
@Override
public String getText(LotroGame game) {
return "Sanctuary healing - Choose companion to heal - remaining heals: " + remainingHeals;
}
});
ChooseAndHealCharactersEffect healEffect = new ChooseAndHealCharactersEffect(action, game.getGameState().getCurrentPlayerId(), 0, 1, Filters.type(CardType.COMPANION));
healEffect.setChoiceText("Sanctuary healing - Choose companion to heal - remaining heals: " + remainingHeals);
action.appendEffect(healEffect);
}
return Collections.singletonList(action);
}

View File

@@ -105,6 +105,7 @@
<div id="tabs" width="100%" height="800">
<ul>
<li><a href="#gameHall">Game Hall</a></li>
<li><a href="includes/instruction.html">Manual</a></li>
<li><a href="includes/leagueRules.html">League Rules</a></li>
<li><a href="includes/contribute.html">Contribute</a></li>
<li><a href="includes/changeLog.html">Change Log</a></li>

View File

@@ -0,0 +1,81 @@
<h1>Manual</h1>
<p>GEMP-Lotr is an automatic game client for the Lord of the Rings Tradable Card Game. Below you will
find basic information about using it.</p>
<ol>
<li><b>The Game Hall</b><br/>
A place where everything starts. When you log in, you automatically enter Game Hall.
Same thing happens when you win/lose game. Basically you can communicate here with
other players, create decks, create and join games, etc.
</li>
<li><b>Building The Deck</b><br/>
Making a deck is very easy. In the Game Hall you will find Edit Deck button. Simply click it and
the deck builder will open. It is divided into three parts. In the left one, you can choose Ring
Bearer, The One Ring and Sites. To the right side you can find card sets, from which cards are
added to the deck. By clicking on the culture icon, cards from the selected ones will appear.
To reset, simply click again on the icon. Middle part is what actually your deck consists of. It
is divided into two sections, Free Peoples and Shadow.<br/>
Gemp has built-in validator, which counts Free Peoples/Shadow cards and checks if the deck
is valid for selected format.
</li>
<li><b>Setting up game</b><br/>
Once you have created the deck, you can host/join games. Simply again, click on Create Table
and the game is ready. It will start automatically when someone will join it.<br/>
To join game click Join Table button in the selected green square (which represents table)
I strongly recommend to check both options in the Settings tab (i. e. auto-pass when there
is no action and auto-accept after selecting action or card) - game will speed up and will be
smoother for both players.
</li>
<li><b>Playing game</b><br/>
Playing Lord of the Rings TCG via Gemp is similar to the one played in real life. First you bid
number of burdens to determine who goes first. If you win it, a window with choose a seat
number at the table will pop-up. Number 1 means that you want to go first, number 2 that
opponent will and so on.<br/>
Next step is choosing your starting fellowship. Select characters by clicking on them for the
total twilight cost up to 4 (selected character is the one with a blue frame on it). Select one,
click Done and select another one (if able).<br/>
Time to play some cards! On the bottom part of the game you can find your starting hand.
Click one time on the card to play it. Gemp automatically adds twilight points and triggers
actions which are not optional (for example, playing A Wizard is never late will automatically
let you choose a "Gandalf culture" character to play from the draw deck. However the
actions which may be used, are not played automatically (even it is obvious that you want
to do it). If such action is available, affected card will be highlighted with green frame (for
example Old Toby allows you to draw a card when you play it, but it needs to be clicked again
for this action to happen, as it is optional). This applies to all other actions in all stages of the
game.<br/>
Below the frame with turn sequence there is a smaller one where you will find what
you currently can do. In most cases cards eligible to play at the current moment will be
highlighted. If you dont want to do anything, click Pass and the next step will commence.
</li>
<li><b>Skirmish</b><br/>
As a vital part of the game, skirmish at first may look complicated. However, when you get
used to Gemp interface you will see its fast and user friendly. For the beginners, few words
on how it works.<br/>
First you need to assign minions to companions. Click on the minion, then the companion
you wish to fight him (eligible companions will be highlighted). Assigned minions and
companions will appear to the right side of the game table. When you finish assigning, click
Done. Before you do it, think if it is your final decision, because you wont be able to assign
them differently afterwards.<br/>
Next step is skirmish. Click on the character which you want to fight first. When that skirmish
is complete, select another one and so on. Skirmish events, special abilities, etc. which are
playable will be highlighted during every fight. If you dont want to play any, click Pass.
If such are not available, Gemp will do it automatically. After all skirmishes are resolved
(including fierce ones) game will proceed to next stage (Regroup)
</li>
<li><b>The Iron rule</b><br/>
There is no rolling back, simple as that. You cant cancel action that already happen, even if
opponent will agree. If you played cards you didnt want to, assigned wrong or didnt trigger
optional action its done and cant be reversed.
</li>
<li><b>Useful Stuff</b><br/>
On the upper part of the game hall, you will find many tabs with useful information. Thus its
not obligated, I recommend to read it.
</li>
</ol>