本文整理汇总了C#中Weapon.get_my_name方法的典型用法代码示例。如果您正苦于以下问题:C# Weapon.get_my_name方法的具体用法?C# Weapon.get_my_name怎么用?C# Weapon.get_my_name使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Weapon
的用法示例。
在下文中一共展示了Weapon.get_my_name方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: attack_monster_in_grid
public void attack_monster_in_grid(Floor fl, Weapon w, int c_monsterID, gridCoordinate current_gc, double multiplier, out bool rolled_max, bool charge_attack = false)
{
rolled_max = false;
List<Attack> modified_attacks = new List<Attack>();
if (fl.badguy_by_monster_id(c_monsterID) != null && !fl.monster_aware_of_player(c_monsterID) && my_class == Chara_Class.Rogue)
max_energy += 2;
if (fl.badguy_by_monster_id(c_monsterID) != null)
{
if (w != null)
{
string attack_msg = "You attack the " + fl.badguy_by_monster_id(c_monsterID).my_name + " with your " + w.get_my_name() + "!";
message_buffer.Add(attack_msg);
List<Attack> attacks = new List<Attack>();
List<StatusEffect> debuffs = new List<StatusEffect>();
bool aoe_effect = false;
if (w.get_my_weapon_type() == Weapon.Type.Axe || w.get_my_weapon_type() == Weapon.Type.Lance)
aoe_effect = true;
handle_attack_damage(w, null, multiplier, charge_attack, out rolled_max, ref attacks, ref debuffs);
fl.damage_monster(attacks, debuffs, c_monsterID, true, aoe_effect);
}
else //Unarmed attack.
{
double base_dmg_val = (double)rGen.Next(1, 4) * multiplier;
if (base_dmg_val == 3 * multiplier)
rolled_max = true;
int modified_dmg_val = (int)base_dmg_val;
if (my_character == Character.Falsael)
modified_dmg_val = (int)Math.Ceiling(base_dmg_val * 1.2);
modified_attacks.Add(new Attack(Attack.Damage.Crushing, modified_dmg_val));
string attack_msg = "You attack the " + fl.badguy_by_monster_id(c_monsterID).my_name + " with your fists!";
message_buffer.Add(attack_msg);
fl.damage_monster(modified_attacks, null, c_monsterID, true, false);
}
}
}
示例2: attack_Doodad_in_grid
public void attack_Doodad_in_grid(Floor fl, Weapon w, int c_DoodadID, gridCoordinate current_gc, double multiplier, out bool rolled_max, bool charge_attack = false)
{
rolled_max = false;
if (w != null)
{
string attack_msg = "You attack the " + fl.Doodad_by_index(c_DoodadID).my_name() + " with your " + w.get_my_name() + "!";
message_buffer.Add(attack_msg);
List<Attack> attacks = new List<Attack>();
List<StatusEffect> debuffs = new List<StatusEffect>();
handle_attack_damage(w, null, multiplier, charge_attack, out rolled_max, ref attacks, ref debuffs);
fl.damage_Doodad(attacks, c_DoodadID);
}
else
{
double base_dmg_val = (double)rGen.Next(1, 4) * multiplier;
if (base_dmg_val == 3 * multiplier)
rolled_max = true;
int modified_dmg_val = (int)base_dmg_val;
if (my_character == Character.Falsael)
modified_dmg_val = (int)Math.Ceiling(base_dmg_val * 1.2);
List<Attack> attacks = new List<Attack>();
attacks.Add(new Attack(Attack.Damage.Crushing, modified_dmg_val));
string attack_msg = "You attack the " + fl.Doodad_by_index(c_DoodadID).my_name() + " with your fists!";
message_buffer.Add(attack_msg);
fl.damage_Doodad(attacks, c_DoodadID);
}
}