//味方パーティにダメージが直接発生した場合 public void hp_damage_set(int damage_num, int free1, int free2) { //最大以上は防止 { int min1 = -(mhp_call() - hp_call()); int max1 = hp_call(); //int min1 = -hp_call(); //int max1 = (mhp_call() - hp_call()); damage_num = m1.iover(damage_num, min1, max1); } //実際のダメージ計算 { damage_set(damage_num); // if (hp_check() <= 0) defeat_set(); } { int min1 = -(mhp_call()); int max1 = +(mhp_call()); value_change1_1.value1_add(damage_num, min1, max1); } }
public void coin_add(int coin_num1) { //最大以上は防止 { int min1 = -coin_num_call(); int max1 = 99999999 - coin_num_call(); coin_num1 = m1.iover(coin_num1, min1, max1); coin_num += coin_num1; coin_num = m1.iover(coin_num, 0, 99999999); value_change_coin.value1_add(-coin_num1, -99999999, 99999999); } }
//MHPやMMPが変わった際、パラメータがフレームごとに変化 //flow_num 0でコピー //1で実行 public void mhp_and_mmp_counter_change(int flow_num) { int min1 = -999999999; int max1 = 999999999; if (flow_num == 0) { hp_memo = hp_call(); mhp_memo = mhp_call(); mp_memo = mp_call(); mmp_memo = mmp_call(); } if (flow_num == 1) { s1.battle_run.battle_member_group_status_control.hp_and_mp_min_max_check(); value_change1_1.value1_add((hp_memo - hp_call()), min1, max1); value_change2_1.value1_add((mhp_memo - mhp_call()), min1, max1); value_change1_2.value1_add((mp_memo - mp_call()), min1, max1); value_change2_2.value1_add((mmp_memo - mmp_call()), min1, max1); } }
//敵キャラクターにダメージが直接発生した場合 public void damage_set(int damage_num, int skill_point_cure_flag, int free1) { //最大以上は防止 { int min1 = -(battle_enemy_status.call_battle_status(battle_enemy_status.STATUS_MHP) - battle_enemy_status.call_battle_status(battle_enemy_status.STATUS_HP)); int max1 = battle_enemy_status.call_battle_status(battle_enemy_status.STATUS_HP); damage_num = m1.iover(damage_num, min1, max1); } //実際のダメージ計算 { battle_enemy_status.damage_set(damage_num); //hp_check(); if (hp_check() <= 0) { defeat_set(); } } /* * * //シールドがあってHPが75%を下回ると壊れる * { * if (battle_enemy_status.shield_flag == 1) * { * // if (call_hp_per() <= 50) * if (call_hp_per3() <= 500)//750) * { * battle_enemy_status.shield_flag = 0; * * s.so.se_play(s.so.SE_BATTLE_SHIELD_BREAK); * * * { * int x1 = x; * int y1 = y - call_h() / 2; * int color1 = battle_enemy_status.call_shield_attribute(); * * * // int size1 = s.battle_enemy_group.battle_enemy[num].call_w(); * // int size2 = s.battle_enemy_group.battle_enemy[num].call_h(); * * // if (size1 < size2) size1 = size2; * * * { * // int la1 = 100 * size1 / 128; * * int color = color1; * s.effect_group.create(x1, y1, s.effect_group.ENEMY_SHIELD_BREAK, 100, color, 0, 0); * } * } * } * } * } */ { int min1 = -battle_enemy_status.call_battle_status(battle_enemy_status.STATUS_MHP); int max1 = battle_enemy_status.call_battle_status(battle_enemy_status.STATUS_MHP); value_change.value1_add(damage_num, min1, max1); } /* * //敵にダメージを与えた時のみ、SPに回復が行われる * if (damage_num >= 1)// && skill_point_cure_flag>=1) * { * long damage_per2 = (long)10000 * damage_num / battle_enemy_status.status_box[battle_enemy_status.STATUS_MHP]; * int defeat_flag = 0; * * if (battle_enemy_status.status_box[battle_enemy_status.STATUS_HP] <= 0) { defeat_flag = 1; } * * s.gm.skill_point_cure((int)damage_per2, battle_enemy_status.call_boss_type(), defeat_flag, 0); * } */ }