本文整理汇总了C#中Floor.damage_Doodad方法的典型用法代码示例。如果您正苦于以下问题:C# Floor.damage_Doodad方法的具体用法?C# Floor.damage_Doodad怎么用?C# Floor.damage_Doodad使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Floor
的用法示例。
在下文中一共展示了Floor.damage_Doodad方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: 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);
}
}