本文整理汇总了C#中Classes.Player.OppositeTeam方法的典型用法代码示例。如果您正苦于以下问题:C# Player.OppositeTeam方法的具体用法?C# Player.OppositeTeam怎么用?C# Player.OppositeTeam使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Classes.Player
的用法示例。
在下文中一共展示了Player.OppositeTeam方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: DragonBreathAcid
// spell_breathes_acid
internal static void DragonBreathAcid(Effect arg_0, object param, Player attacker)
{
Affect affect = (Affect)param;
gbl.byte_1DA70 = false;
if (gbl.combat_round == 0)
{
affect.affect_data = 3;
}
if (affect.affect_data > 0)
{
gbl.damage_flags = DamageType.DragonBreath | DamageType.Acid;
var attackerPos = ovr033.PlayerMapPos(attacker);
gbl.byte_1DA70 = gbl.SpellCastFunction(QuickFight.True, (int)Spells.spell_3d);
if (gbl.byte_1DA70 == true)
{
BuildAreaDamageTargets(6, 1, gbl.targetPos, attackerPos);
}
if (gbl.spellTargets.Exists(target => attacker.OppositeTeam() == target.combat_team))
{
gbl.byte_1DA70 = false;
}
if (gbl.byte_1DA70 == true &&
gbl.spellTargets.Count > 0)
{
ovr025.DisplayPlayerStatusString(true, 10, "breathes acid", attacker);
ovr025.load_missile_icons(0x12);
ovr025.draw_missile_attack(0x1E, 1, ovr033.PlayerMapPos(gbl.spellTargets[0]), ovr033.PlayerMapPos(attacker));
foreach (var target in gbl.spellTargets)
{
bool save_made = ovr024.RollSavingThrow(0, SaveVerseType.type3, target);
ovr024.damage_person(save_made, DamageOnSave.Half, attacker.hit_point_max, target);
}
affect.affect_data--;
ovr025.clear_actions(attacker);
}
}
}
示例2: sub_3560B
internal static bool sub_3560B(Player player)
{
byte[] spell_list = new byte[gbl.max_spells];
int spells_count = 0;
if (player.actions.can_cast == true)
{
foreach (int id in player.spellList.LearntList())
{
spell_list[spells_count++] = (byte)id;
}
}
byte spell_id = 0;
byte priority = 7;
int var_5B = ovr024.roll_dice(7, 1);
int var_5D = 1;
if (spells_count > 0 &&
(player.control_morale >= Control.NPC_Base || gbl.AutoPCsCastMagic == true))
{
if ((player.OppositeTeam() == CombatTeam.Ours ? gbl.friends_count : gbl.foe_count) > 0)
{
while (var_5D <= var_5B && spell_id == 0)
{
for (int var_5E = 1; var_5E < 4 && spell_id == 0; var_5E++)
{
int random_spell_index = ovr024.roll_dice(spells_count, 1) - 1;
byte random_spell_id = spell_list[random_spell_index];
if (ShouldCastSpellX(priority, random_spell_id, player))
{
spell_id = random_spell_id;
}
}
priority--;
var_5D++;
}
}
}
bool casting_spell;
if (spell_id > 0)
{
ovr014.spell_menu3(out casting_spell, QuickFight.True, spell_id);
}
else
{
casting_spell = false;
}
return casting_spell;
}
示例3: can_attack_target
/* sub_40F1F */
internal static bool can_attack_target(Player target, Player attacker)
{
bool result;
if (target.OppositeTeam() == attacker.combat_team ||
attacker.quick_fight == QuickFight.True)
{
result = true;
}
else if (ovr027.yes_no(gbl.defaultMenuColors, "Attack Ally: ") != 'Y')
{
result = false;
}
else
{
result = true;
gbl.area2_ptr.field_666 = 1;
foreach (Player player in gbl.TeamList)
{
if (player.health_status == Status.okey &&
player.control_morale >= Control.NPC_Base)
{
player.combat_team = CombatTeam.Enemy;
player.actions.target = null;
}
}
ovr025.CountCombatTeamMembers();
}
return result;
}
示例4: sub_354AA
internal static bool sub_354AA(Player player)
{
Item bestWand = null;
int teamCount = player.OppositeTeam() == CombatTeam.Ours ? gbl.friends_count : gbl.foe_count;
if (player.actions.can_use == true &&
teamCount > 0 &&
gbl.area_ptr.can_cast_spells == false)
{
int prioritisToTry = ovr024.roll_dice(7, 1);
for (int i = 0; i < prioritisToTry; i++)
{
int priority = 7 - i;
foreach (var item_ptr in player.items)
{
byte spell_id = (byte)item_ptr.affect_2;
if (item_ptr.IsScroll() == false &&
(int)item_ptr.affect_3 < 0x80 &&
item_ptr.readied &&
spell_id > 0)
{
if (spell_id > 0x38)
{
spell_id -= 0x17;
}
if (ShouldCastSpellX(priority, spell_id, player))
{
bestWand = item_ptr;
break;
}
}
}
}
}
if (bestWand != null)
{
bool var_15 = false; /* simeon */
ovr020.UseMagicItem(ref var_15, bestWand);
return true;
}
return false;
}
示例5: MaxOppositionMoves
// sub_40E8F
internal static int MaxOppositionMoves(Player player)
{
int maxMoves = 0;
foreach (Player mob in gbl.TeamList)
{
if (player.OppositeTeam() == mob.combat_team && mob.in_combat == true)
{
int moves = CalcMoves(mob) / 2;
maxMoves = System.Math.Max(moves, maxMoves);
}
}
return maxMoves;
}