本文整理汇总了C#中Classes.Player类的典型用法代码示例。如果您正苦于以下问题:C# Player类的具体用法?C# Player怎么用?C# Player使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
Player类属于Classes命名空间,在下文中一共展示了Player类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的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.
}
开发者ID:gowantervo,项目名称:coab,代码行数:7,代码来源:ovr024.cs
示例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);
}
}
}
开发者ID:gowantervo,项目名称:coab,代码行数:36,代码来源:ovr014.cs
示例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);
}
}
开发者ID:gowantervo,项目名称:coab,代码行数:34,代码来源:ovr017.cs
示例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
}
开发者ID:runelippert,项目名称:TestGame,代码行数:28,代码来源:Player.cs
示例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);
}
开发者ID:runelippert,项目名称:TestGame,代码行数:29,代码来源:PlayerTests.cs
示例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;
}
}
开发者ID:gowantervo,项目名称:coab,代码行数:9,代码来源:ovr013.cs
示例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;
}
开发者ID:gowantervo,项目名称:coab,代码行数:10,代码来源:ovr013.cs
示例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();
}
开发者ID:Kindlar,项目名称:Character-Gen,代码行数:9,代码来源:PlayerTests.cs
示例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];
}
开发者ID:gowantervo,项目名称:coab,代码行数:11,代码来源:GasCloud.cs
示例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;
}
}
开发者ID:gowantervo,项目名称:coab,代码行数:12,代码来源:ovr013.cs
示例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;
}
开发者ID:gowantervo,项目名称:coab,代码行数:14,代码来源:ovr025.cs
示例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);
}
}
开发者ID:gowantervo,项目名称:coab,代码行数:14,代码来源:ovr014.cs
示例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);
}
}
开发者ID:runelippert,项目名称:TestGame,代码行数:46,代码来源:Program.cs
示例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;
}
}
开发者ID:gowantervo,项目名称:coab,代码行数:40,代码来源:ovr013.cs
示例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;
}
}
}
开发者ID:gowantervo,项目名称:coab,代码行数:24,代码来源:ovr025.cs
示例16: SaveVerseZeroBonus
private static void SaveVerseZeroBonus(Player player, bool applyBonus)
{
if (player.race == Race.dwarf ||
player.race == Race.halfling ||
applyBonus == true)
{
if (player.stats2.Con.full >= 4 && player.stats2.Con.full <= 6)
{
player.saveVerse[0] += 1;
}
else if (player.stats2.Con.full >= 7 && player.stats2.Con.full <= 10)
{
player.saveVerse[0] += 2;
}
else if (player.stats2.Con.full >= 11 && player.stats2.Con.full <= 13)
{
player.saveVerse[0] += 3;
}
else if (player.stats2.Con.full >= 14 && player.stats2.Con.full <= 17)
{
player.saveVerse[0] += 4;
}
else if (player.stats2.Con.full == 18)
{
player.saveVerse[0] += 5;
}
}
if (player.stats2.Con.full == 19 || player.stats2.Con.full == 20)
{
player.saveVerse[0] += 1;
}
else if (player.stats2.Con.full == 21 || player.stats2.Con.full == 22)
{
player.saveVerse[0] += 2;
}
else if (player.stats2.Con.full == 23 || player.stats2.Con.full == 24)
{
player.saveVerse[0] += 3;
}
else if (player.stats2.Con.full == 25)
{
player.saveVerse[0] += 4;
}
}
开发者ID:gowantervo,项目名称:coab,代码行数:45,代码来源:ovr026.cs
示例17: HumanCurrentClass_Unknown
// getFirstSkill
static ClassId HumanCurrentClass_Unknown(Player player)
{
if (player.race != Race.human)
{
return ClassId.unknown;
}
for (ClassId index = ClassId.cleric; index <= ClassId.monk; index++)
{
if (player.ClassLevel[(int)index] > 0)
{
return index;
}
}
return ClassId.unknown;
}
开发者ID:gowantervo,项目名称:coab,代码行数:18,代码来源:ovr026.cs
示例18: DualClassExceedLastLevel
// sub_6B3D1
static bool DualClassExceedLastLevel(Player player)
{
return HumanCurrentClassLevel_Zero(player) > player.multiclassLevel;
}
开发者ID:gowantervo,项目名称:coab,代码行数:5,代码来源:ovr026.cs
示例19: sub_6A00F
// sub_6A00F
internal static void sub_6A00F(Player player)
{
for (int i = 0; i < 5; i++)
{
player.spellCastCount[0, i] = 0;
player.spellCastCount[1, i] = 0;
player.spellCastCount[2, i] = 0;
}
for (SkillType skill = SkillType.Cleric; skill <= SkillType.Monk; skill++)
{
int skillLevel = player.SkillLevel(skill);
if (skillLevel > 0)
{
switch (skill)
{
case SkillType.Cleric:
player.spellCastCount[0, 0] += 1;
for (int PlayerLvl = 0; PlayerLvl <= (skillLevel - 2); PlayerLvl++)
{
for (int sp_lvl = 0; sp_lvl < 5; sp_lvl++)
{
player.spellCastCount[0, sp_lvl] += ClericSpellLevels[PlayerLvl, sp_lvl];
}
}
calc_cleric_spells(false, player);
foreach (Spells spell in System.Enum.GetValues(typeof(Spells)))
{
SpellEntry se = gbl.spellCastingTable[(int)spell];
int sp_class = (se.spellLevel - 1) / 5;
int sp_lvl = (se.spellLevel - 1) % 5;
if (se.spellClass == 0 &&
player.spellCastCount[sp_class, sp_lvl] > 0 &&
spell != Spells.animate_dead)
{
player.LearnSpell(spell);
}
}
break;
case SkillType.Paladin:
if (skillLevel > 8)
{
for (int addLvl = 8; addLvl < skillLevel; addLvl++)
{
for (int spellLvl = 0; spellLvl < 5; spellLvl++)
{
player.spellCastCount[0, spellLvl] += PaladinSpellLevels[addLvl, spellLvl];
}
}
foreach (Spells spell in System.Enum.GetValues(typeof(Spells)))
{
SpellEntry se = gbl.spellCastingTable[(int)spell];
int sp_class = (se.spellLevel - 1) / 5;
int sp_lvl = (se.spellLevel - 1) % 5;
if (se.spellClass == 0 &&
player.spellCastCount[sp_class, sp_lvl] > 0)
{
player.LearnSpell(spell);
}
}
}
break;
case SkillType.Ranger:
if (skillLevel > 7)
{
for (int var_3 = 8; var_3 <= skillLevel; var_3++)
{
for (int sp_lvl = 0; sp_lvl < 3; sp_lvl++)
{
player.spellCastCount[1, sp_lvl] += unk_1A758[var_3, sp_lvl];
}
for (int sp_lvl = 3; sp_lvl < 5; sp_lvl++)
{
player.spellCastCount[2, sp_lvl - 3] += unk_1A758[var_3, sp_lvl];
}
}
foreach (Spells spell in System.Enum.GetValues(typeof(Spells)))
{
if (gbl.spellCastingTable[(int)spell].spellClass == SpellClass.Druid)
{
player.LearnSpell(spell);
}
}
}
break;
//.........这里部分代码省略.........
开发者ID:gowantervo,项目名称:coab,代码行数:101,代码来源:ovr026.cs
示例20: SecondClassAllowed
/* sub_6AD3E */
internal static bool SecondClassAllowed(ClassId _class, Player player)
{
var firstClass = HumanCurrentClass_Unknown(player);
bool var_2 = _class != firstClass;
int var_3 = 0;
while (var_3 <= 5 &&
(gbl.class_stats_min[(int)firstClass][var_3] < 9 || player.stats2[var_3].cur > 14))
{
var_3++;
}
var_2 = (var_2 == true && var_3 > 5);
var_3 = 0;
while (var_3 <= 5 &&
(gbl.class_stats_min[(int)_class][var_3] < 9 || player.stats2[var_3].cur > 16))
{
var_3++;
}
var_2 = (var_2 == true && var_3 > 5);
byte var_4 = 1;
while (gbl.class_alignments[(int)_class, 0] >= var_4 &&
gbl.class_alignments[(int)_class, var_4] != player.alignment)
{
var_4++;
}
if (var_2 == false ||
gbl.class_alignments[(int)_class, 0] < var_4)
{
var_2 = false;
}
else
{
var_2 = true;
}
return var_2;
}
开发者ID:gowantervo,项目名称:coab,代码行数:44,代码来源:ovr026.cs
注:本文中的Classes.Player类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论