本文整理汇总了C#中Projectile.set_talisman_effects方法的典型用法代码示例。如果您正苦于以下问题:C# Projectile.set_talisman_effects方法的具体用法?C# Projectile.set_talisman_effects怎么用?C# Projectile.set_talisman_effects使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Projectile
的用法示例。
在下文中一共展示了Projectile.set_talisman_effects方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: cast_spell
public void cast_spell(Scroll s, Floor fl, gridCoordinate spell_target, int target_monster_ID, int target_Doodad_ID)
{
string spell_name = s.get_my_name();
Projectile.projectile_type prj_type = s.get_assoc_projectile();
Attack.Damage spell_dmg_type = s.get_damage_type();
gridCoordinate starting_coord = my_grid_coord;
Projectile.special_anim spec_prj_anim = s.get_spec_impact_anim();
c_energy -= s.get_manaCost();
max_energy += s.get_en_cap_adj();
if (max_energy > 100)
max_energy = 100;
if (max_energy < 0)
max_energy = 0;
if (s.get_spell_type() == Scroll.Atk_Area_Type.piercingBolt)
{
int spell_range = s.get_range();
int relative_x = (spell_target.x - my_grid_coord.x) * spell_range;
int relative_y = (spell_target.y - my_grid_coord.y) * spell_range;
starting_coord = new gridCoordinate(spell_target);
spell_target = new gridCoordinate(my_grid_coord.x + relative_x, my_grid_coord.y + relative_y);
}
if (s.get_spell_type() != Scroll.Atk_Area_Type.personalBuff)
{
Projectile prj = new Projectile(starting_coord, spell_target, prj_type,
ref cont, false, s.get_spell_type());
prj.attach_scroll(s);
prj.set_wall_destroying(s.spell_destroys_walls());
prj.set_special_anim(spec_prj_anim);
if (s.get_spell_type() == Scroll.Atk_Area_Type.enemyDebuff)
{
prj.attach_status_effect(s.get_status_effect(), s.get_duration(), s.does_spell_buff_count_down(), s.get_cost_per_turn(), s.get_cost_per_turn_per_turn());
}
if (s.get_spell_type() == Scroll.Atk_Area_Type.cloudAOE ||
s.get_spell_type() == Scroll.Atk_Area_Type.solidblockAOE ||
s.get_spell_type() == Scroll.Atk_Area_Type.randomblockAOE)
prj.set_AOE_size(s.get_aoe_size());
if (s.get_spell_type() == Scroll.Atk_Area_Type.chainedBolt)
{
prj.set_bounce(s.get_range());
prj.set_bounces_left(s.get_t_impacts());
}
if (String.Compare(s.get_my_name(), "Earthquake") == 0)
prj.set_special_anim(Projectile.special_anim.Earthquake);
prj.set_talisman_effects(s.get_my_equipped_talismans());
fl.create_new_projectile(prj);
}
else
{
int base_buff_time = s.get_duration();
int modified_buff_time = base_buff_time;
if (my_character == Character.Petaer)
{
double buff_time_bonus = (double)modified_buff_time * .3;
modified_buff_time = (int)Math.Ceiling((double)modified_buff_time + buff_time_bonus);
}
add_single_statusEffect(new StatusEffect(s.get_status_effect(), modified_buff_time+1, s.does_spell_buff_count_down(), s.get_cost_per_turn(), s.get_cost_per_turn_per_turn(), false));
}
}