Commit be40960c authored by TanakaKotoha's avatar TanakaKotoha

fix

parent a7e585e6
Pipeline #1050 passed with stages
in 45 minutes and 18 seconds
......@@ -37,13 +37,14 @@ function cm.activate(e,tp,eg,ep,ev,re,r,rp)
end
Duel.SendtoGrave(tt,REASON_EFFECT)
Duel.Recover(tp,tt:GetCount()*1000,REASON_EFFECT)
local e2=Effect.CreateEffect(e:GetHandler())
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_PRE_BATTLE_DAMAGE)
e2:SetCondition(cm.rdcon)
e2:SetOperation(cm.rdop)
e2:SetReset(RESET_EVENT+RESET_PHASE+PHASE_END,1)
Duel.RegisterEffect(e2,tp)
local e3=Effect.CreateEffect(e:GetHandler())
e3:SetType(EFFECT_TYPE_FIELD)
e3:SetCode(EFFECT_CHANGE_BATTLE_DAMAGE)
e3:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e3:SetTargetRange(1,0)
e3:SetValue(HALF_DAMAGE)
e3:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e3,tp)
end
function cm.rdcon(e,tp,eg,ep,ev,re,r,rp)
return ep==tp
......
......@@ -108,7 +108,7 @@ function cm.operation(e,tp,eg,ep,ev,re,r,rp)
local tp=e:GetHandler():GetControler()
local c=e:GetHandler()
local tc=Duel.SelectMatchingCard(tp,nil,tp,LOCATION_HAND+LOCATION_ONFIELD,0,1,1,nil):GetFirst()
if c:IsRelateToEffect(e) and Duel.Destroy(tc,REASON_EFFECT)~=0 then
if Duel.Destroy(tc,REASON_EFFECT)~=0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET)
local g=Duel.SelectMatchingCard(tp,cm.filter,tp,LOCATION_DECK,0,1,1,nil,false)
if g:GetCount()>0 then
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment