本文整理汇总了C#中FuryOfDracula.GameLogic.GameState.AdjustVampires方法的典型用法代码示例。如果您正苦于以下问题:C# GameState.AdjustVampires方法的具体用法?C# GameState.AdjustVampires怎么用?C# GameState.AdjustVampires使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类FuryOfDracula.GameLogic.GameState
的用法示例。
在下文中一共展示了GameState.AdjustVampires方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: ResolveCombat
//.........这里部分代码省略.........
firstRound = false;
}
var health = -1;
foreach (var h in huntersInvolved)
{
Console.WriteLine("How much health does {0} have now?", h.Hunter.Name());
do
{
if (int.TryParse(Console.ReadLine(), out health))
{
health = Math.Max(0, Math.Min(h.MaxHealth, health));
Console.WriteLine(health);
}
} while (health == -1);
h.AdjustHealth(health - h.Health);
}
if (opponent == Opponent.Dracula)
{
Console.WriteLine("How much blood does Dracula have now?");
do
{
if (int.TryParse(Console.ReadLine(), out health))
{
health = Math.Max(0, Math.Min(15, health));
Console.WriteLine(health);
}
} while (health == -1);
game.Dracula.AdjustBlood(health - game.Dracula.Blood);
}
Console.WriteLine("Did {0} win? (An end result is a no)", huntersInvolved.Count() > 1 ? "the Hunters" : huntersInvolved.First().Hunter.Name());
string input;
do
{
input = Console.ReadLine();
} while (!"yes".StartsWith(input.ToLower()) && !"no".StartsWith(input.ToLower()));
if ("yes".StartsWith(input.ToLower()))
{
if (opponent == Opponent.NewVampire)
{
game.AdjustVampires(-1);
}
Console.WriteLine("Don't forget to register any cards discarded, such as Great Strength used to prevent health loss, Events due to enemy Knife wounds, Items consumed, etc.");
return true;
}
if (opponent == Opponent.Dracula)
{
switch (enemyCombatCardChosen)
{
case EnemyCombatCard.Mesmerize:
Console.WriteLine("{0} is bitten and must discard all Items!", enemyTarget.Name());
if (!HunterPlayingGreatStrengthToCancelBite(game, enemyTarget, logic))
{
game.Hunters[(int)enemyTarget].AdjustBites(1);
}
while (game.Hunters[(int)enemyTarget].ItemCount > 0)
{
var line = "";
var itemDiscarded = Item.None;
do
{
Console.WriteLine("What is the name of the Item being discarded?");
line = Console.ReadLine();
itemDiscarded = Enumerations.GetItemFromString(line);
} while (itemDiscarded == Item.None);
game.Hunters[(int)enemyTarget].DiscardItem(game, itemDiscarded);
}
CheckForHunterDeath(game); break;
case EnemyCombatCard.Fangs:
Console.WriteLine("{0} is bitten!", enemyTarget.Name());
if (!HunterPlayingGreatStrengthToCancelBite(game, enemyTarget, logic))
{
game.Hunters[(int)enemyTarget].AdjustBites(1);
}
CheckForHunterDeath(game);
goto case EnemyCombatCard.EscapeBat;
case EnemyCombatCard.EscapeBat:
Console.WriteLine("Dracula escaped in the form of a bat");
Location destination = logic.ChooseEscapeAsBatDestination(game);
game.Dracula.EscapeAsBat(game, destination);
logic.AddEscapeAsBatCardToAllTrails(game);
int position = -1;
if (game.HuntersAt(destination).Any() || destination == Location.CastleDracula)
{
position = game.Dracula.RevealCardInTrailWithLocation(destination);
logic.EliminateTrailsThatDoNotContainLocationAtPosition(game, destination, position);
}
else
{
logic.EliminateTrailsThatHaveHuntersAtPosition(game, game.Dracula.CurrentLocationPosition);
}
break;
}
}
Console.WriteLine("Don't forget to register any cards discarded, such as Great Strength used to prevent health loss or Items due to enemy Knife wounds");
foreach (HunterPlayer h in huntersInvolved)
{
h.LastCombatCardChosen = Item.None;
}
return false;
}
示例2: CheckForHunterDeath
/// <summary>
/// Checks all Hunters to see if they are dead and adjusts them accordingly if they are
/// </summary>
/// <param name="game">The GameState</param>
/// <returns>True if a Hunter has died</returns>
private static bool CheckForHunterDeath(GameState game)
{
var hunterDied = false;
foreach (var h in game.Hunters)
{
if (h != null && (h.Health == 0 || h.BiteCount == h.BitesRequiredToKill))
{
Console.WriteLine(
"{0} has been defeated. All Items and Events discarded. Hunter moved to St. Joseph and St. Mary and must skip the next turn", h.Hunter.Name());
while (h.ItemCount > 0)
{
DiscardUnknownItemFromHunter(game, h);
}
while (h.EventCount > 0)
{
DiscardUnknownEventFromHunter(game, h);
}
h.MoveTo(Location.StJosephAndStMary);
h.AdjustHealth(h.MaxHealth);
h.AdjustBites(-3);
if (h.Hunter == Hunter.MinaHarker)
{
h.AdjustBites(1);
}
hunterDied = true;
game.AdjustVampires(2);
}
}
return hunterDied;
}
示例3: PlayVampireLair
/// <summary>
/// Resolves the Vampire Lair Event card
/// </summary>
/// <param name="game">The GameState</param>
/// <param name="hunterPlayingEvent">The Hunter playing the Event</param>
/// <param name="logic">The artificial intelligence component</param>
private static void PlayVampireLair(GameState game, Hunter hunterPlayingEvent, DecisionMaker logic)
{
if (game.Vampires < 1)
{
Console.WriteLine("No Vampires to battle");
return;
}
if (ResolveCombat(game, new List<HunterPlayer> { game.Hunters[(int)hunterPlayingEvent] }, Opponent.NewVampire,
logic))
{
game.AdjustVampires(-1);
}
}
示例4: MatureEncounter
/// <summary>
/// Matures an Encounter
/// </summary>
/// <param name="game">The GameState</param>
/// <param name="encounterTileBeingMatured">The EncounterTile being matured</param>
/// <param name="logic">The artificial intelligence component</param>
private static void MatureEncounter(GameState game, EncounterTile encounterTileBeingMatured, DecisionMaker logic)
{
switch (encounterTileBeingMatured.Encounter)
{
case Encounter.Ambush:
Console.WriteLine("Dracula matured Ambush");
var hunterToAmbush = logic.ChooseHunterToAmbush(game);
if (hunterToAmbush != Hunter.Nobody)
{
var encounterToAmbushWith = logic.ChooseEncounterTileToAmbushHunterWith(game, hunterToAmbush);
ResolveEncounterTile(game, encounterToAmbushWith, new List<Hunter> { hunterToAmbush }, logic, -1);
game.Dracula.DiscardEncounterTile(game, encounterToAmbushWith);
game.EncounterPool.Add(encounterToAmbushWith);
}
break;
case Encounter.DesecratedSoil:
Console.WriteLine("Dracula matured Desecrated Soil");
game.Dracula.ClearTrailDownTo(game, 3);
logic.TrimAllPossibleTrails(3);
for (var i = 0; i < 2; i++)
{
Console.WriteLine(
"Draw an Event card. If it is a Hunter card, name it, otherwise type \"take\"");
var line = "";
var eventDrawn = Event.None;
do
{
line = Console.ReadLine();
eventDrawn = Enumerations.GetEventFromString(line);
} while (eventDrawn == Event.None &&
!"take".StartsWith(line.ToLower()));
if (eventDrawn == Event.None)
{
var eventPlayedByDracula = game.Dracula.TakeEvent(game.EventDeck, game.EventDiscard);
PlayImmediatelyDraculaCard(game, eventPlayedByDracula, logic);
if (game.Dracula.EventHand.Count() > game.Dracula.EventHandSize)
{
Console.WriteLine("Dracula discarded {0}", game.Dracula.DiscardEvent(logic.ChooseEventToDiscard(game), game.EventDiscard).Name());
}
}
else
{
var eventCardDiscarded = game.EventDeck.Find(card => card.Event == eventDrawn);
game.EventDeck.Remove(eventCardDiscarded);
game.EventDiscard.Add(eventCardDiscarded);
}
}
break;
case Encounter.NewVampire:
Console.WriteLine("Dracula matured a New Vampire");
game.AdjustVampires(2);
game.Dracula.ClearTrailDownTo(game, 1);
logic.TrimAllPossibleTrails(1); break;
}
game.EncounterPool.Add(encounterTileBeingMatured);
}