def add_eexp(type)
@eexp[type] += 1
ls_id = EEXP[type][3][@eexp[type]]
learn_skill(ls_id) if !ls_id.nil?
end
요거랑
class Scene_Battle < Scene_Base
include Extra_exp
alias eexp_display_added_states display_added_states
def display_added_states(target, obj = nil)
eexp_display_added_states(target,obj)
eexp_absorb if !$free_eexp.nil?
end
def eexp_absorb
mt = []
for a in $game_party.members
mt.push(a) if a.mtype_exp == $free_eexp
end
m = $game_party.members[rand($game_party.members.size)]
$game_actors[m.id].add_eexp($free_eexp)
$free_eexp = nil
end
end
짐 요부분에서요
그 게임안에 이벤트 스크립트로
어떻게 임의의 $free_eexp = n 을정해서
m = $game_party.members[rand($game_party.members.size)]
$game_actors[m.id].add_eexp[($free_eexp)
$free_eexp = nil
요것처럼 더해줄 수 있나요?
추가내용입니다.
class Game_Enemy < Game_Battler
include Extra_exp
alias colapsed_eexp perform_collapse
def perform_collapse
colapsed_exep
if $game_temp.in_battle and dead?
$free_eexp = eexp_type?(enemy)
end
end
def eexp_type?(enemy)
ptype = []; rtype = []
for rank in -100..200
for el_id in 0...$data_system.elements.size
ptype.push(el_id) if rank == element_rate(el_id)
end
if !ptype.empty?
for sp_i in 0...EEXP.size
for pt in ptype
rtype.push(sp_i) if pt == EEXP[sp_i][1]
end
end
type = rtype[rand(rtype.size)]
if !type.nil?
return type
break
end
elsif ptype.size == $data_system.elements.size
return Eexpless ? nil : 0
end
end
return nil
end
end