本文整理汇总了C#中Effect.PrintEffect方法的典型用法代码示例。如果您正苦于以下问题:C# Effect.PrintEffect方法的具体用法?C# Effect.PrintEffect怎么用?C# Effect.PrintEffect使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Effect
的用法示例。
在下文中一共展示了Effect.PrintEffect方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: ApplyEffect
// Effects of Cards/Wonders to be applied instantly. Other effects will be ignored
// and left to another global function to deal with it at the end of the game.
public static void ApplyEffect(Player p, Player east, Player west, Effect e)
{
// RESOURCES
if (resourceType.ContainsKey(e.type))
AddResource(p, resourceType[e.type], e.amount);
// VICTORY POINTS
else if (e.type.Equals(Effect.TypeType.VICTORY))
{
// NO FROM/BASIS - add to score
if (e.from == Effect.FromType.NONE && e.basis == Effect.BasisType.NONE)
AddScore(p, Score.VICTORY, e.amount);
// Adding to the Score for Blue Structures raised
else if (e.from == Effect.FromType.NONE && e.basis.Equals(Effect.BasisType.BLUE))
{
AddScore(p, Score.VICTORY_BLUE, e.amount);
AddScore(p, Score.VICTORY, e.amount);
}
}
// COINS
else if (e.type.Equals(Effect.TypeType.COIN))
{
// No FROM/BASIS - add coin
if (e.from == Effect.FromType.NONE && e.basis == Effect.BasisType.NONE)
AddResource(p, Resource.COIN, e.amount);
// FROM: PLAYER
// BASIS: CardColour, Wonderstages
else if (e.from.Equals(Effect.FromType.PLAYER))
{
if (e.basis.Equals(Effect.BasisType.WONDER))
AddCoinWonder(p, e.amount);
else
AddCoinColour(p, cardType[e.basis], e.amount);
}
// FROM: ALL
else if (e.from.Equals(Effect.FromType.ALL))
AddCoinAllColour(p, east, west, cardType[e.basis], e.amount);
}
// RESOURCE CHOICE
else if (e.type.Equals(Effect.TypeType.RCHOICE))
{
List<Resource> choice = new List<Resource>();
foreach (Effect.TypeType c in e.list)
choice.Add(resourceType[c]);
if ((e.basis.Equals(Effect.BasisType.YELLOW) || e.basis.Equals(Effect.BasisType.WONDER)))
AddResourceUnPurchaseable(p, choice);
else
AddResourceChoice(p, choice);
}
// ARMY
else if (e.type.Equals(Effect.TypeType.ARMY))
AddScore(p, Score.ARMY, e.amount);
// Manufactured Resource Trade
else if (e.type.Equals(Effect.TypeType.MCOST))
SetManufactedTrade(p);
// Raw Resource Trade
else if (e.type.Equals(Effect.TypeType.RCOSTEAST))
SetRawTradeEast(p);
else if (e.type.Equals(Effect.TypeType.RCOSTWEST))
SetRawTradeWest(p);
// SCIENCE
else if (e.type.Equals(Effect.TypeType.COMPASS) || e.type.Equals(Effect.TypeType.TABLET) || e.type.Equals(Effect.TypeType.GEAR))
AddScore(p, scienceType[e.type], e.amount);
// ===== WONDER SPECIFIC =====
// FREE BUILD - not finished *wild card --> can be done at anytime during an age
else if (e.type.Equals(Effect.TypeType.FREEBUILD))
{
}
// DISCARD - End of turn the stage was built and build a card from discard pile for free
else if (e.type.Equals(Effect.TypeType.DISCARD))
{
}
// Players should know their neighbours east and west
e.PrintEffect();
}