Commit 22f154ab authored by gggg's avatar gggg

Merge branch 'master' of git.mycard.moe:nanahira/Nanahira-Cards

parents 067d662d e53b1baa
Pipeline #35833 failed with stage
in 23 seconds
...@@ -1178,6 +1178,11 @@ function cm.NanahiraTrap(c,...) ...@@ -1178,6 +1178,11 @@ function cm.NanahiraTrap(c,...)
if te:GetCode()==EVENT_FREE_CHAIN then if te:GetCode()==EVENT_FREE_CHAIN then
e1:SetHintTiming(0x1e0) e1:SetHintTiming(0x1e0)
end end
e1:SetCountLimit(99999)
e1:SetProperty(e1:GetProperty() | EFFECT_FLAG_DAMAGE_STEP)
if c:IsType(TYPE_COUNTER) then
e1:SetProperty(e1:GetProperty() | EFFECT_FLAG_DAMAGE_CAL)
end
e1:SetCost(cm.SelfReleaseCost) e1:SetCost(cm.SelfReleaseCost)
e1:SetCondition(function(e,tp,eg,ep,ev,re,r,rp) e1:SetCondition(function(e,tp,eg,ep,ev,re,r,rp)
if e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED) then return false end if e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED) then return false end
......
...@@ -133,7 +133,7 @@ cm.e2 = { ...@@ -133,7 +133,7 @@ cm.e2 = {
end, end,
op = function (e, tp, eg, ep, ev, re, r, rp) op = function (e, tp, eg, ep, ev, re, r, rp)
local c = e:GetHandler() local c = e:GetHandler()
if Duel.Remove(c, POS_FACEUP, REASON_EFFECT) > 0 then if c:IsRelateToEffect(e) and Duel.Remove(c, POS_FACEUP, REASON_EFFECT) > 0 then
Duel.BreakEffect() Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG, tp, HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG, tp, HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp, cm.e2.filter, tp, LOCATION_EXTRA, 0, 1, 1, nil, e, tp) local g=Duel.SelectMatchingCard(tp, cm.e2.filter, tp, LOCATION_EXTRA, 0, 1, 1, nil, e, tp)
...@@ -142,4 +142,4 @@ cm.e2 = { ...@@ -142,4 +142,4 @@ cm.e2 = {
end end
end end
end end
} }
\ No newline at end of file
...@@ -16,7 +16,7 @@ cm.initial_effect = function (c) ...@@ -16,7 +16,7 @@ cm.initial_effect = function (c)
if cm.e2 then if cm.e2 then
local e1 = Effect.CreateEffect(c) local e1 = Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_REMOVE + CATEGORY_SPECIAL_SUMMON) e1:SetCategory(CATEGORY_REMOVE + CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_FIELD + EFFECT_TYPE_TRIGGER_O) e1:SetType(EFFECT_TYPE_FIELD + EFFECT_TYPE_TRIGGER_F)
e1:SetCode(EVENT_PHASE + PHASE_END) e1:SetCode(EVENT_PHASE + PHASE_END)
e1:SetRange(LOCATION_MZONE) e1:SetRange(LOCATION_MZONE)
e1:SetCondition(cm.e2.con) e1:SetCondition(cm.e2.con)
...@@ -56,14 +56,14 @@ cm.e2 = { ...@@ -56,14 +56,14 @@ cm.e2 = {
tg = function (e, tp, eg, ep, ev, re, r, rp, chk) tg = function (e, tp, eg, ep, ev, re, r, rp, chk)
local c = e:GetHandler() local c = e:GetHandler()
if chk == 0 then if chk == 0 then
return c:IsAbleToRemove() and Duel.IsPlayerCanSpecialSummon(tp) return true -- c:IsAbleToRemove() and Duel.IsPlayerCanSpecialSummon(tp)
end end
Duel.SetOperationInfo(0, CATEGORY_SPECIAL_SUMMON, nil, 1, tp, LOCATION_REMOVED) Duel.SetOperationInfo(0, CATEGORY_SPECIAL_SUMMON, nil, 1, tp, LOCATION_REMOVED)
Duel.SetOperationInfo(0, CATEGORY_REMOVE, c, 1, 0, 0) Duel.SetOperationInfo(0, CATEGORY_REMOVE, c, 1, 0, 0)
end, end,
op = function (e, tp, eg, ep, ev, re, r, rp) op = function (e, tp, eg, ep, ev, re, r, rp)
local c = e:GetHandler() local c = e:GetHandler()
if Duel.Remove(c, POS_FACEUP, REASON_EFFECT) > 0 and c:IsLocation(LOCATION_REMOVED) and c:IsFaceup() then if c:IsRelateToEffect(e) and Duel.Remove(c, POS_FACEUP, REASON_EFFECT) > 0 and c:IsLocation(LOCATION_REMOVED) and c:IsFaceup() and Duel.GetLocationCount(tp, LOCATION_MZONE) > 0 then
Duel.BreakEffect() Duel.BreakEffect()
Duel.SpecialSummon(c, 0, tp, tp, false, false, POS_FACEUP) Duel.SpecialSummon(c, 0, tp, tp, false, false, POS_FACEUP)
local e1=Effect.CreateEffect(e:GetHandler()) local e1=Effect.CreateEffect(e:GetHandler())
...@@ -109,6 +109,7 @@ cm.e2 = { ...@@ -109,6 +109,7 @@ cm.e2 = {
Duel.Hint(HINT_SELECTMSG, tp, HINTMSG_FACEUP) Duel.Hint(HINT_SELECTMSG, tp, HINTMSG_FACEUP)
local sg = Duel.SelectMatchingCard(tp, cm.e2.gain.atkfilter, tp, LOCATION_MZONE, LOCATION_MZONE, 1, 1, e:GetHandler(), g:GetFirst():GetAttack()) local sg = Duel.SelectMatchingCard(tp, cm.e2.gain.atkfilter, tp, LOCATION_MZONE, LOCATION_MZONE, 1, 1, e:GetHandler(), g:GetFirst():GetAttack())
local tc = sg:GetFirst() local tc = sg:GetFirst()
Duel.HintSelection(sg)
if not tc:IsImmuneToEffect(e) then if not tc:IsImmuneToEffect(e) then
local og = tc:GetOverlayGroup() local og = tc:GetOverlayGroup()
if og:GetCount() > 0 then if og:GetCount() > 0 then
...@@ -119,4 +120,4 @@ cm.e2 = { ...@@ -119,4 +120,4 @@ cm.e2 = {
end end
end end
} }
} }
\ No newline at end of file
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