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) ...@@ -37,13 +37,14 @@ function cm.activate(e,tp,eg,ep,ev,re,r,rp)
end end
Duel.SendtoGrave(tt,REASON_EFFECT) Duel.SendtoGrave(tt,REASON_EFFECT)
Duel.Recover(tp,tt:GetCount()*1000,REASON_EFFECT) Duel.Recover(tp,tt:GetCount()*1000,REASON_EFFECT)
local e2=Effect.CreateEffect(e:GetHandler()) local e3=Effect.CreateEffect(e:GetHandler())
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) e3:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EVENT_PRE_BATTLE_DAMAGE) e3:SetCode(EFFECT_CHANGE_BATTLE_DAMAGE)
e2:SetCondition(cm.rdcon) e3:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e2:SetOperation(cm.rdop) e3:SetTargetRange(1,0)
e2:SetReset(RESET_EVENT+RESET_PHASE+PHASE_END,1) e3:SetValue(HALF_DAMAGE)
Duel.RegisterEffect(e2,tp) e3:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e3,tp)
end end
function cm.rdcon(e,tp,eg,ep,ev,re,r,rp) function cm.rdcon(e,tp,eg,ep,ev,re,r,rp)
return ep==tp return ep==tp
......
...@@ -108,7 +108,7 @@ function cm.operation(e,tp,eg,ep,ev,re,r,rp) ...@@ -108,7 +108,7 @@ function cm.operation(e,tp,eg,ep,ev,re,r,rp)
local tp=e:GetHandler():GetControler() local tp=e:GetHandler():GetControler()
local c=e:GetHandler() local c=e:GetHandler()
local tc=Duel.SelectMatchingCard(tp,nil,tp,LOCATION_HAND+LOCATION_ONFIELD,0,1,1,nil):GetFirst() 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) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET)
local g=Duel.SelectMatchingCard(tp,cm.filter,tp,LOCATION_DECK,0,1,1,nil,false) local g=Duel.SelectMatchingCard(tp,cm.filter,tp,LOCATION_DECK,0,1,1,nil,false)
if g:GetCount()>0 then 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