public virtual Types.damage_combo prepare_dmg() { Types.damage_combo dmg = new Types.damage_combo(); dmg.init(); dmg.physical_dmg = runtime_u_stats.damage; dmg = Onhit_pre(dmg); return(dmg); }
Item_name[] comps; //components public void init(Item_name _name) { cost = 0; //cost of itself, not incluing components comps = new Item_name[5]; //max 5 components Onhit_dmg.init(); stats_add.init(); stats_mult.init(); stats_add_base.init(); stats_mult_base.init(); ItemName = _name; load_item_stats(_name); }
public override bool act_E() { if ((E_skill.level > 0) && (E_timer.is_over()) && (!E_flag) && can_cast()) { E_flag = true; //how many times E deals damage int dmg_times = 5 + (int)((runtime_c_stats.level - 1 - ((runtime_c_stats.level - 1) % 3)) / 3); //the total damage of E update_E_damage(); E_dur_timer.restart(); E_timer.restart(); E_obj = Instantiate(E_aoe_prefab, transform.position, transform.rotation) as GameObject; Types.damage_combo zero = new Types.damage_combo(); zero.init(); E_obj.GetComponent <Garen_E> ().init(this, E_dur_timer, dmg_times, E_damage); E_obj.name = "Garen_E_prefab"; E_obj.transform.SetParent(transform.parent); return(true); } return(false); }
//call this before actual init(); public void init_pre() { netID = transform.parent.gameObject.GetComponent <NetworkIdentity> (); self_col = GetComponent <Collider> (); cur_target_obj = null; status = new List <Status> (); flags = new unit_flags(); flags.init(); if ((!netID.isLocalPlayer) && (isPlayer)) { return; } //stats base_u_stats = new unit_stats(); base_u_stats.init(); base_u_stats_mult = new unit_stats(); base_u_stats_mult.init_to_1(); u_stats_growth = new unit_stats(); u_stats_growth.init(); bonus_u_stats = new unit_stats(); bonus_u_stats.init(); bonus_u_stats_mult = new unit_stats(); bonus_u_stats_mult.init_to_1(); inCombat_timer = new Utility.Timer(GameSceneConsts.in_combat_time); regen_timer = new Utility.Timer(GameSceneConsts.regen_interval); regen_timer.start_timer(); items = new Item[GameSceneConsts.max_item + GameSceneConsts.max_supp_item]; for (int i = 0; i < items.Length; ++i) { items [i] = null; } Onhit_dmg = new Types.damage_combo(); Onhit_dmg.init(); recent_dmg_receive = new Types.damage_combo(); recent_dmg_receive.init(); }
//all on-hit item effect need to be processed before hitting target public virtual Types.damage_combo Onhit_pre_item(Types.damage_combo combo) { combo.init(); return(combo); }