﻿-- 以簡馭繁 同一場戰鬥中，連續使用同一項招式出招，招式威力加成愈高（每累積１次，下次攻擊的招式威力加成額外增加10％）。

local s
local n = 0

function BeginBattle()
	property[Prop.SkillDamageFactor] = 0
end

function BeforeAttack(skill)
	if n > 1 and skill == s then
		controller.PrintLaunch(unit, item.Name)
		property[Prop.SkillDamageFactor] = ( n - 1 ) *  10
	end

	if property[Prop.SkillDamageFactor] > 60 then 
		property[Prop.SkillDamageFactor] = 60 
	end
end

function AfterAttack(skill, info)

	if skill ~= s then
		n = 0
		property[Prop.SkillDamageFactor] = 0
	end
	
	s = skill
	n = n + 1
end 

