#------------------------------------------------------------------------
# 攻击力(合)
#------------------------------------------------------------------------
def atk
n = @atk
@gifts = [] if @gifts.nil?
@dur = self.read_note('耐久度').to_i if @dur.nil?
if @dur > 0
for g in @gifts.compact do n += g.atk(actor_id) end
for g in @gifts.compact do n += g.all_atribute(actor_id) end
else
n = (@atk * 0.3).round
for g in @gifts.compact do n += (g.atk(actor_id) * 0.3).round end
for g in @gifts.compact do n += (g.all_atribute(actor_id) *0.3).round end
end
return n
end
#------------------------------------------------------------------------
# 攻击力(合)
#------------------------------------------------------------------------
def atk
n = @atk
@gifts = [] if @gifts.nil?
@dur = self.read_note('耐久度').to_i if @dur.nil?
if @dur > 0
for g in @gifts.compact do n += g.atk(actor_id) end
for g in @gifts.compact do n += g.all_atribute(actor_id) end
else
n = (@atk * 0.3).round
for g in @gifts.compact do n += (g.atk(actor_id) * 0.3).round end
for g in @gifts.compact do n += (g.all_atribute(actor_id) *0.3).round end
end
return n
end