Commit 0cd8b458 authored by POLYMER's avatar POLYMER

fix

parent ac2fe2cd
...@@ -37,7 +37,7 @@ function cm.initial_effect(c) ...@@ -37,7 +37,7 @@ function cm.initial_effect(c)
local e5=Effect.CreateEffect(c) local e5=Effect.CreateEffect(c)
e5:SetType(EFFECT_TYPE_FIELD) e5:SetType(EFFECT_TYPE_FIELD)
e5:SetCode(EFFECT_ADD_CODE) e5:SetCode(EFFECT_ADD_CODE)
e5:SetTargetRange(LOCATION_ONFIELD,LOCATION_ONFIELD) e5:SetTargetRange(0,LOCATION_ONFIELD)
e5:SetCondition(function(e) return e:GetHandler():GetSequence()<5 end) e5:SetCondition(function(e) return e:GetHandler():GetSequence()<5 end)
e5:SetTarget(function(e,c) return aux.GetColumn(c) and math.abs(aux.GetColumn(c)-aux.GetColumn(e:GetHandler()))==1 end) e5:SetTarget(function(e,c) return aux.GetColumn(c) and math.abs(aux.GetColumn(c)-aux.GetColumn(e:GetHandler()))==1 end)
e5:SetValue(11451631) e5:SetValue(11451631)
...@@ -167,6 +167,29 @@ function cm.thfilter(c) ...@@ -167,6 +167,29 @@ function cm.thfilter(c)
return c:IsAbleToHand() and c:IsSetCard(0x979) return c:IsAbleToHand() and c:IsSetCard(0x979)
end end
function cm.actop(e,tp,eg,ep,ev,re,r,rp) function cm.actop(e,tp,eg,ep,ev,re,r,rp)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_PHASE+PHASE_STANDBY)
e1:SetCountLimit(1)
if Duel.GetCurrentPhase()==PHASE_STANDBY then
e1:SetLabel(Duel.GetTurnCount())
e1:SetReset(RESET_PHASE+PHASE_STANDBY,2)
else
e1:SetLabel(0)
e1:SetReset(RESET_PHASE+PHASE_STANDBY)
end
e1:SetCondition(cm.descon2)
e1:SetTarget(cm.destg2)
e1:SetOperation(cm.desop2)
Duel.RegisterEffect(e1,tp)
end
function cm.descon2(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnCount()~=e:GetLabel()
end
function cm.destg2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.thfilter,tp,LOCATION_DECK,0,1,nil) end
end
function cm.desop2(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
local g=Duel.GetMatchingGroup(cm.thfilter,tp,LOCATION_DECK,0,nil) local g=Duel.GetMatchingGroup(cm.thfilter,tp,LOCATION_DECK,0,nil)
if #g>0 then if #g>0 then
......
...@@ -36,7 +36,9 @@ local e4=Effect.CreateEffect(c) ...@@ -36,7 +36,9 @@ local e4=Effect.CreateEffect(c)
e4:SetCondition(function(e,tp,eg,ep,ev,re,r,rp) e4:SetCondition(function(e,tp,eg,ep,ev,re,r,rp)
local ct1=Duel.GetCustomActivityCount(13000750,1-tp,ACTIVITY_CHAIN) local ct1=Duel.GetCustomActivityCount(13000750,1-tp,ACTIVITY_CHAIN)
local ct2=Duel.GetCustomActivityCount(13000750,tp,ACTIVITY_CHAIN) local ct2=Duel.GetCustomActivityCount(13000750,tp,ACTIVITY_CHAIN)
return (ct1+ct2)>=3 and e:GetHandler():IsFaceup() end) local a=2-Duel.GetMatchingGroupCount(nil,tp,LOCATION_HAND,0,e:GetHandler())
local b=2-Duel.GetMatchingGroupCount(nil,1-tp,LOCATION_HAND,0,e:GetHandler())
return (ct1+ct2)>=3 and e:GetHandler():IsFaceup() and Duel.IsPlayerCanDraw(tp,ct) and (a>0 or b>0) end)
e4:SetOperation(cm.disop) e4:SetOperation(cm.disop)
c:RegisterEffect(e4) c:RegisterEffect(e4)
if not cm.global_check then if not cm.global_check then
......
...@@ -143,7 +143,7 @@ function cm.spop(e,tp,eg,ep,ev,re,r,rp) ...@@ -143,7 +143,7 @@ function cm.spop(e,tp,eg,ep,ev,re,r,rp)
if ft>=1 then if ft>=1 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local spcg=Group.CreateGroup() local spcg=Group.CreateGroup()
if ft<=Duel.GetLocationCount(tp,LOCATION_MZONE) then if ft>=spg:GetCount() then
spcg=spg spcg=spg
else else
spcg=spg:Select(tp,ft,ft,nil) spcg=spg:Select(tp,ft,ft,nil)
......
...@@ -129,7 +129,7 @@ function cm.spop(e,tp,eg,ep,ev,re,r,rp) ...@@ -129,7 +129,7 @@ function cm.spop(e,tp,eg,ep,ev,re,r,rp)
if ft>=1 then if ft>=1 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local spcg=Group.CreateGroup() local spcg=Group.CreateGroup()
if ft<=Duel.GetLocationCount(tp,LOCATION_MZONE) then if ft>=spg:GetCount() then
spcg=spg spcg=spg
else else
spcg=spg:Select(tp,ft,ft,nil) spcg=spg:Select(tp,ft,ft,nil)
......
...@@ -76,7 +76,6 @@ function cm.tnop(e,tp,eg,ep,ev,re,r,rp) ...@@ -76,7 +76,6 @@ function cm.tnop(e,tp,eg,ep,ev,re,r,rp)
e3:SetCode(EVENT_CHAINING) e3:SetCode(EVENT_CHAINING)
e3:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL+EFFECT_FLAG_NO_TURN_RESET) e3:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL+EFFECT_FLAG_NO_TURN_RESET)
e3:SetRange(LOCATION_MZONE) e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1)
e3:SetReset(RESET_EVENT+RESETS_STANDARD) e3:SetReset(RESET_EVENT+RESETS_STANDARD)
e3:SetCondition(cm.discon) e3:SetCondition(cm.discon)
e3:SetTarget(cm.distg) e3:SetTarget(cm.distg)
...@@ -144,7 +143,7 @@ function cm.spop(e,tp,eg,ep,ev,re,r,rp) ...@@ -144,7 +143,7 @@ function cm.spop(e,tp,eg,ep,ev,re,r,rp)
if ft>=1 then if ft>=1 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local spcg=Group.CreateGroup() local spcg=Group.CreateGroup()
if ft<=Duel.GetLocationCount(tp,LOCATION_MZONE) then if ft>=spg:GetCount() then
spcg=spg spcg=spg
else else
spcg=spg:Select(tp,ft,ft,nil) spcg=spg:Select(tp,ft,ft,nil)
......
...@@ -135,7 +135,7 @@ function cm.spop(e,tp,eg,ep,ev,re,r,rp) ...@@ -135,7 +135,7 @@ function cm.spop(e,tp,eg,ep,ev,re,r,rp)
if ft>=1 then if ft>=1 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local spcg=Group.CreateGroup() local spcg=Group.CreateGroup()
if ft<=Duel.GetLocationCount(tp,LOCATION_MZONE) then if ft>=spg:GetCount() then
spcg=spg spcg=spg
else else
spcg=spg:Select(tp,ft,ft,nil) spcg=spg:Select(tp,ft,ft,nil)
......
This diff is collapsed.
...@@ -76,7 +76,7 @@ function cm.spop(e,tp,eg,ep,ev,re,r,rp) ...@@ -76,7 +76,7 @@ function cm.spop(e,tp,eg,ep,ev,re,r,rp)
if ft>=1 then if ft>=1 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local spcg=Group.CreateGroup() local spcg=Group.CreateGroup()
if ft<=Duel.GetLocationCount(tp,LOCATION_MZONE) then if ft>=spg:GetCount() then
spcg=spg spcg=spg
else else
spcg=spg:Select(tp,ft,ft,nil) spcg=spg:Select(tp,ft,ft,nil)
......
...@@ -127,13 +127,13 @@ function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -127,13 +127,13 @@ function cm.sptg(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
local g=Duel.GetMatchingGroup(cm.spfilter,tp,LOCATION_DECK,0,nil,e,tp,c) local g=Duel.GetMatchingGroup(cm.spfilter,tp,LOCATION_DECK,0,nil,e,tp,c)
return e:GetHandler():IsReleasable() and Duel.IsPlayerCanSpecialSummon(tp) and g:CheckSubGroup(cm.spgcheck) and not Duel.IsPlayerAffectedByEffect(tp,63060238) and not Duel.IsPlayerAffectedByEffect(tp,97148796) return e:GetHandler():IsReleasable(REASON_EFFECT) and Duel.IsPlayerCanSpecialSummon(tp) and g:CheckSubGroup(cm.spgcheck) and not Duel.IsPlayerAffectedByEffect(tp,63060238) and not Duel.IsPlayerAffectedByEffect(tp,97148796)
end end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
end end
function cm.spop(e,tp,eg,ep,ev,re,r,rp) function cm.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
if not (c:IsRelateToEffect(e) and c:IsReleasable()) then return end if not (c:IsRelateToEffect(e) and c:IsReleasable(REASON_EFFECT)) then return end
if Duel.Release(c,REASON_EFFECT)~=0 and Duel.IsPlayerCanSpecialSummon(tp) then if Duel.Release(c,REASON_EFFECT)~=0 and Duel.IsPlayerCanSpecialSummon(tp) then
local ct=1 local ct=1
local dcount=Duel.GetFieldGroupCount(tp,LOCATION_DECK,0) local dcount=Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)
...@@ -160,7 +160,7 @@ function cm.spop(e,tp,eg,ep,ev,re,r,rp) ...@@ -160,7 +160,7 @@ function cm.spop(e,tp,eg,ep,ev,re,r,rp)
if ft>=1 then if ft>=1 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local spcg=Group.CreateGroup() local spcg=Group.CreateGroup()
if ft<=Duel.GetLocationCount(tp,LOCATION_MZONE) then if ft>=spg:GetCount() then
spcg=spg spcg=spg
else else
spcg=spg:Select(tp,ft,ft,nil) spcg=spg:Select(tp,ft,ft,nil)
......
...@@ -5,6 +5,7 @@ function c28355662.initial_effect(c) ...@@ -5,6 +5,7 @@ function c28355662.initial_effect(c)
e0:SetType(EFFECT_TYPE_SINGLE) e0:SetType(EFFECT_TYPE_SINGLE)
e0:SetCode(EFFECT_TRAP_ACT_IN_HAND) e0:SetCode(EFFECT_TRAP_ACT_IN_HAND)
e0:SetCondition(c28355662.excondition) e0:SetCondition(c28355662.excondition)
e0:SetCost(c28355662.excost)
e0:SetDescription(aux.Stringid(28355662,2)) e0:SetDescription(aux.Stringid(28355662,2))
c:RegisterEffect(e0) c:RegisterEffect(e0)
--Activate --Activate
...@@ -31,14 +32,15 @@ end ...@@ -31,14 +32,15 @@ end
function c28355662.excondition(e,tp,eg,ep,ev,re,r,rp) function c28355662.excondition(e,tp,eg,ep,ev,re,r,rp)
return (Duel.GetLP(tp)<=3000 and Duel.CheckLPCost(tp,2500)) or (Duel.GetLP(tp)>3000 and Duel.CheckLPCost(tp,4000)) return (Duel.GetLP(tp)<=3000 and Duel.CheckLPCost(tp,2500)) or (Duel.GetLP(tp)>3000 and Duel.CheckLPCost(tp,4000))
end end
function c28355662.excost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.PayLPCost(tp,2000)
end
function c28355662.cost(e,tp,eg,ep,ev,re,r,rp,chk) function c28355662.cost(e,tp,eg,ep,ev,re,r,rp,chk)
local b1=Duel.CheckLPCost(tp,2000) local b1=Duel.CheckLPCost(tp,2000)
local b2=Duel.GetLP(tp)<=3000 and Duel.CheckLPCost(tp,500) local b2=Duel.GetLP(tp)<=3000 and Duel.CheckLPCost(tp,500)
local b3=Duel.IsPlayerAffectedByEffect(tp,28368431) local b3=Duel.IsPlayerAffectedByEffect(tp,28368431)
if chk==0 then return b1 or b2 end if chk==0 then return b1 or b2 end
if e:GetHandler():IsStatus(STATUS_ACT_FROM_HAND) then
Duel.PayLPCost(tp,2000)
end
if b3 or not b1 or (b2 and Duel.SelectYesNo(tp,aux.Stringid(28355662,0))) then if b3 or not b1 or (b2 and Duel.SelectYesNo(tp,aux.Stringid(28355662,0))) then
Duel.PayLPCost(tp,500) Duel.PayLPCost(tp,500)
else else
......
...@@ -91,7 +91,7 @@ function c28368431.costchange(e,re,rp,val) ...@@ -91,7 +91,7 @@ function c28368431.costchange(e,re,rp,val)
end end
end end
function c28368431.condition(e,tp,eg,ep,ev,re,r,rp) function c28368431.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetLP(tp)<=3000 return Duel.GetLP(e:GetHandlerPlayer())<=3000
end end
function c28368431.rccon(e,tp,eg,ep,ev,re,r,rp) function c28368431.rccon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetFlagEffect(tp,28368431)>0 return Duel.GetFlagEffect(tp,28368431)>0
......
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