def skill_attack_coord(pc, x, y, xyr, damage, skill_id, skill_lv): ml, dl, cl, el = [], [], [], [] with pc.lock and pc.map_obj.lock: for m in pc.map_obj.monster_list: if not general.coord_in_range(m.x, m.y, x, y, xyr): continue set_skill_attack_result(m, damage, ml, dl, cl, el) for i, j in el: pc.exp_add(i, j) #スキル使用結果通知(対象:地面) pc.map_send_map("138d", pc, ml, x, y, skill_id, skill_lv, dl, cl)
def skill_attack_monster_range(pc, monster, xyr, damage, skill_id, skill_lv): ml, dl, cl, el = [], [], [], [] x, y = monster.x, monster.y with pc.lock and pc.map_obj.lock: set_skill_attack_result(monster, damage, ml, dl, cl, el) for m in pc.map_obj.monster_list: if not general.coord_in_range(m.x, m.y, x, y, xyr): continue if m == monster: continue set_skill_attack_result(m, damage, ml, dl, cl, el) for i, j in el: pc.exp_add(i, j) #スキル使用結果通知(対象:単体) pc.map_send_map("1392", pc, ml, skill_id, skill_lv, dl, cl)