本文整理汇总了C#中Classes.Player类的典型用法代码示例。如果您正苦于以下问题:C# Player类的具体用法?C# Player怎么用?C# Player使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
Player类属于Classes命名空间,在下文中一共展示了Player类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: add_affect
internal static void add_affect(bool call_spell_jump_list, int data, ushort minutes, Affects type, Player player)
{
Affect affect = new Affect(type, minutes, (byte)data, call_spell_jump_list);
player.affects.Add(affect);
//TODO simplify this funcation.
}
示例2: AffectOwlbearHugRoundAttack
// sub_426FC
internal static void AffectOwlbearHugRoundAttack(Effect arg_0, object param, Player player)
{
Affect affect = (Affect)param;
gbl.spell_target = gbl.player_array[affect.affect_data];
if (arg_0 == Effect.Remove ||
player.in_combat == false ||
gbl.spell_target.in_combat == false)
{
ovr024.remove_affect(null, Affects.clear_movement, gbl.spell_target);
if (arg_0 == Effect.Add)
{
affect.callAffectTable = false;
ovr024.remove_affect(affect, Affects.owlbear_hug_round_attack, player);
}
}
else
{
player.attack1_AttacksLeft = 1;
player.attack2_AttacksLeft = 0;
player.attack1_DiceCount = 2;
player.attack1_DiceSize = 8;
AttackTarget(null, 2, gbl.spell_target, player);
ovr025.clear_actions(player);
if (gbl.spell_target.in_combat == false)
{
ovr024.remove_affect(null, Affects.owlbear_hug_round_attack, player);
ovr024.remove_affect(null, Affects.clear_movement, gbl.spell_target);
}
}
}
示例3: AssignPlayerIconId
// sub_4A60A
internal static void AssignPlayerIconId(Player player)
{
player.icon_id = 0xff;
gbl.TeamList.Add(player);
gbl.SelectedPlayer = player;
bool[] icon_slot = new bool[8];
foreach (Player tmpPlayer in gbl.TeamList)
{
if (tmpPlayer.icon_id >= 0 && tmpPlayer.icon_id < 8)
{
icon_slot[tmpPlayer.icon_id] = true;
}
}
// Now find the lowest free icon slot.
player.icon_id = 0;
while (player.icon_id < 8 &&
icon_slot[player.icon_id] == true)
{
player.icon_id += 1;
}
gbl.area2_ptr.party_size++;
if (player.control_morale >= Control.NPC_Base)
{
ovr026.ReclacClassBonuses(player);
}
}
示例4: ExecuteDobbleMove
public void ExecuteDobbleMove(Player player)
{
Console.WriteLine("");
Console.WriteLine("EXECUTE: Double move");
for (int i = 0; i < 2; i++ )
{
Console.WriteLine("Hit arrow key for move");
ConsoleKeyInfo keyInfo = Console.ReadKey();
switch (keyInfo.Key)
{
case ConsoleKey.UpArrow:
ExecuteMoveUp(player);
break;
case ConsoleKey.DownArrow:
ExecuteMoveDown(player);
break;
case ConsoleKey.LeftArrow:
executeMoveLeft(player);
break;
case ConsoleKey.RightArrow:
executeMoveRigth(player);
break;
}
}
//Execute orer
}
示例5: ExecuteMoveOrderTest
public void ExecuteMoveOrderTest(Player.Orders order, int end_x, int end_y)
{
//Arrange
Team firsteTeam = new Team() { TeamName = "The greeks" };
Team secondTeam = new Team() { TeamName = "Olsen banden" };
Match thisMatch = new Match()
{
HomeTeam = firsteTeam,
AwayTeam = secondTeam
};
Player alfred = new Player() { Name = "Alfred", Position = new Coordinate(1, 1), PlayerOrder = order, Team = firsteTeam };
firsteTeam.PlayersOnTeam.Add(alfred);
firsteTeam.PlayersOnTeam.Add(new Player() { ShirtNumber = 1, Name = "Alpha", Position = new Coordinate(2, 1), Team = firsteTeam });
firsteTeam.PlayersOnTeam.Add(new Player() { ShirtNumber = 2, Name = "Beta", Position = new Coordinate(1, 1), Team = firsteTeam });
secondTeam.PlayersOnTeam.Add(new Player() { ShirtNumber = 10, Name = "Egon", Position = new Coordinate(1, 1), Team = secondTeam });
secondTeam.PlayersOnTeam.Add(new Player() { ShirtNumber = 11, Name = "Benny", Position = new Coordinate(1, 1), Team = secondTeam });
Player player = new Player();
//act
player.ExecuteOrders(thisMatch);
//Assert
Assert.Equal(end_x, alfred.Position.X);
Assert.Equal(end_y, alfred.Position.Y);
}
示例6: AffectBlink
// has_action_timedout
internal static void AffectBlink(Effect arg_0, object param, Player player)
{
if (player.actions.delay == 0)
{
gbl.targetInvisible = true;
gbl.attack_roll = -1;
}
}
示例7: AffectBlinded
// sub_3A951
internal static void AffectBlinded(Effect arg_0, object param, Player player)
{
gbl.attack_roll -= 4;
player.ac -= 4;
player.ac_behind -= 4;
gbl.savingThrowRoll -= 4;
}
示例8: Init
public void Init()
{
Player player = new Player("Kindlar", "Fighter", "Elf", 1);
Player = player;
Player.PlayerClass.AssignBaseStats(10, 10, 10, 10, 10, 10);
Player.CalculateTotalScore();
Player.PlayerClass.CalculateBaseAttack();
Player.GetTotalGroundSpeed();
}
示例9: GasCloud
public GasCloud(Player _player, int count, Point pos)
{
player = _player;
field_1C = count;
targetPos = new Point(pos);
field_1D = false;
// zero the rest.
groundTile = new int[10];
present = new bool[10];
}
示例10: addAffect
internal static bool addAffect(ushort time, int data, Affects affect_type, Player player)
{
if (gbl.cureSpell == true)
{
return false;
}
else
{
ovr024.add_affect(true, data, time, affect_type, player);
return true;
}
}
示例11: BuildNearTargets
/*near_enermy*/
internal static List<CombatPlayerIndex> BuildNearTargets(int max_range, Player player)
{
var scl = ovr032.Rebuild_SortedCombatantList(player, max_range, p => p.combat_team != player.combat_team);
List<CombatPlayerIndex> nearTargets = new List<CombatPlayerIndex>();
foreach (var sc in scl)
{
nearTargets.Add(new CombatPlayerIndex(sc.player, sc.pos));
}
return nearTargets;
}
示例12: AffectOwlbearHugAttackCheck
// hugs
internal static void AffectOwlbearHugAttackCheck(Effect arg_0, object param, Player player)
{
if (gbl.attack_roll >= 18)
{
gbl.spell_target = player.actions.target;
ovr025.DisplayPlayerStatusString(true, 12, "hugs " + gbl.spell_target.name, player);
ovr024.add_affect(false, ovr033.GetPlayerIndex(gbl.spell_target), 0, Affects.clear_movement, gbl.spell_target);
ovr013.CallAffectTable(Effect.Add, null, gbl.spell_target, Affects.clear_movement);
ovr024.add_affect(true, ovr033.GetPlayerIndex(gbl.spell_target), 0, Affects.owlbear_hug_round_attack, player);
}
}
示例13: Main
static void Main(string[] args)
{
Match newMatch = new Match();
Match thisMatch = newMatch.SetupMatch();
Board gameBoard = new Board();
Player players = new Player();
var homeTeamHand = thisMatch.HomeTeam.Hand();
var awayTeamHand = thisMatch.AwayTeam.Hand();
gameBoard.DrawBoard(thisMatch);
//Turn loop
for (int turn = 1; turn <= 9; turn++)
{
Console.WriteLine();
Console.WriteLine("Start of turn {0}", turn);
//Assign orders to all players in the Home match
players.GiveOrders(thisMatch.HomeTeam, homeTeamHand);
//Assign orders to all players in the away team
players.GiveOrders(thisMatch.AwayTeam, awayTeamHand);
//Execute Orders
players.ExecuteOrders(thisMatch);
//Find encounters - doesn't seem to work
List<Coordinate> engagements = thisMatch.CompairePlayersCoordinates(thisMatch);
Rolls roll = new Rolls();
//Roll for all engagements
foreach (Coordinate coordinate in engagements)
{
Console.WriteLine("Engagement at {0},{1}", coordinate.X, coordinate.Y);
roll.RollForEngagement(coordinate, thisMatch);
}
Console.WriteLine("!-----New Turn------!");
gameBoard.DrawBoard(thisMatch);
}
}
示例14: AffectBerzerk
internal static void AffectBerzerk(Effect arg_0, object param, Player player)
{
if (arg_0 == Effect.Add)
{
player.quick_fight = QuickFight.True;
if (player.control_morale < Control.NPC_Base ||
player.control_morale == Control.PC_Berzerk)
{
player.control_morale = Control.PC_Berzerk;
}
else
{
player.control_morale = Control.NPC_Berzerk;
}
if (gbl.game_state == GameState.Combat)
{
player.actions.target = null;
var scl = ovr032.Rebuild_SortedCombatantList(player, 0xff, p => true);
player.actions.target = scl[0].player;
player.actions.can_cast = false;
player.combat_team = player.actions.target.OppositeTeam();
ovr025.DisplayPlayerStatusString(true, 10, "goes berzerk", player);
}
}
else
{
if (player.control_morale == Control.PC_Berzerk)
{
player.control_morale = Control.PC_Base;
}
player.combat_team = CombatTeam.Ours;
}
}
示例15: CalcArmorWeightEffect
// sub_6621E
internal static void CalcArmorWeightEffect(Item item, Player player)
{
if (gbl.ItemDataTable[item.type].item_slot == ItemSlot.Armor)
{
if (item.weight >= 0 && item.weight <= 150)
{
player.movement = player.base_movement;
}
else if (item.weight >= 151 && item.weight <= 399)
{
player.movement = 9;
}
else
{
player.movement = 6;
}
if (player.movement != 0 && player.movement <= 9)
{
player.movement += 3;
}
}
}