Commit 65547dcd authored by 花桃白音's avatar 花桃白音

fix #116s,128s,187s,317,042

parent 12427cff
...@@ -26,7 +26,6 @@ function c12847015.initial_effect(c) ...@@ -26,7 +26,6 @@ function c12847015.initial_effect(c)
e2:SetCategory(CATEGORY_TODECK+CATEGORY_NEGATE+CATEGORY_DESTROY) e2:SetCategory(CATEGORY_TODECK+CATEGORY_NEGATE+CATEGORY_DESTROY)
e2:SetType(EFFECT_TYPE_QUICK_O) e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_CHAINING) e2:SetCode(EVENT_CHAINING)
e2:SetCountLimit(1)
e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL) e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL)
e2:SetRange(LOCATION_MZONE) e2:SetRange(LOCATION_MZONE)
e2:SetCondition(c12847015.negcon) e2:SetCondition(c12847015.negcon)
...@@ -39,10 +38,56 @@ function c12847015.initial_effect(c) ...@@ -39,10 +38,56 @@ function c12847015.initial_effect(c)
e21:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) e21:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e21:SetCode(EVENT_ATTACK_ANNOUNCE) e21:SetCode(EVENT_ATTACK_ANNOUNCE)
e21:SetRange(LOCATION_MZONE) e21:SetRange(LOCATION_MZONE)
e21:SetCountLimit(1)
e21:SetCondition(c12847015.negcon1) e21:SetCondition(c12847015.negcon1)
e21:SetOperation(c12847015.negop1) e21:SetOperation(c12847015.negop1)
c:RegisterEffect(e21) c:RegisterEffect(e21)
--counter
local e4=Effect.CreateEffect(c)
e4:SetDescription(1308)
e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e4:SetCode(EVENT_DRAW)
e4:SetCountLimit(1,12847015+EFFECT_COUNT_CODE_DUEL)
e4:SetRange(0xff)
e4:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e4:SetCondition(c12847015.con)
e4:SetOperation(c12847015.op1)
c:RegisterEffect(e4)
local e5=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE+EFFECT_FLAG_INITIAL)
e1:SetCode(EVENT_PREDRAW)
e1:SetRange(0xff)
e1:SetCountLimit(1,12847016+EFFECT_COUNT_CODE_DUEL)
e1:SetOperation(c12847015.op2)
c:RegisterEffect(e1)
end
function c12847015.con(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetMatchingGroupCount(nil,e:GetHandlerPlayer(),LOCATION_DECK,0,nil)>=36
end
function c12847015.op1(e,tp,eg,ep,ev,re,r,rp)
if not Duel.IsExistingMatchingCard(Card.IsCode,tp,LOCATION_EXTRA,LOCATION_EXTRA,1,nil,4202048) then return end
local g=Duel.GetMatchingGroup(Card.IsCode,tp,LOCATION_EXTRA,LOCATION_EXTRA,nil,4202048)
g:AddCard(e:GetHandler())
if e:GetHandler():IsLocation(LOCATION_HAND) then Duel.Draw(e:GetHandlerPlayer(),1,REASON_RULE) end
for ec in aux.Next(g) do
Duel.Exile(ec,0)
end
Debug.Message("堕天计划已清除")
end
function c12847015.op2(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
--act limit
local e1=Effect.CreateEffect(c)
e1:SetProperty(EFFECT_FLAG_SET_AVAILABLE+EFFECT_FLAG_IGNORE_IMMUNE)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_FORBIDDEN)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetTargetRange(1,1)
e1:SetTarget(c12847015.splimit)
Duel.RegisterEffect(e1,tp)
end
function c12847015.splimit(e,c)
return c:IsCode(4202048)
end end
function c12847015.cfilter(c) function c12847015.cfilter(c)
return c:IsFaceup() and c:IsDisabled() and c:IsType(TYPE_EFFECT) and c:IsReleasable() return c:IsFaceup() and c:IsDisabled() and c:IsType(TYPE_EFFECT) and c:IsReleasable()
......
...@@ -84,7 +84,9 @@ function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -84,7 +84,9 @@ function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
local chkf=tp local chkf=tp
local mg1=Duel.GetFusionMaterial(tp) local mg1=Duel.GetFusionMaterial(tp)
local mg2=Duel.GetMatchingGroup(s.filter0,tp,LOCATION_DECK,0,nil) local mg2=Duel.GetMatchingGroup(s.filter0,tp,LOCATION_DECK,0,nil)
if mg2:GetCount()>0 then
mg1:Merge(mg2) mg1:Merge(mg2)
end
local res=Duel.IsExistingMatchingCard(s.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg1,nil,c,chkf) local res=Duel.IsExistingMatchingCard(s.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg1,nil,c,chkf)
if not res then if not res then
local ce=Duel.GetChainMaterial(tp) local ce=Duel.GetChainMaterial(tp)
...@@ -98,6 +100,7 @@ function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -98,6 +100,7 @@ function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
return res and c:IsRelateToEffect(e) return res and c:IsRelateToEffect(e)
end end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_DECK)
end end
function s.spop(e,tp,eg,ep,ev,re,r,rp) function s.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
......
...@@ -35,8 +35,8 @@ function cm.filter2(c,e,tp) ...@@ -35,8 +35,8 @@ function cm.filter2(c,e,tp)
return c:IsRace(RACE_AQUA) and c:IsAbleToRemove() return c:IsRace(RACE_AQUA) and c:IsAbleToRemove()
end end
function cm.repfilter(c,tp) function cm.repfilter(c,tp)
return c:IsControler(tp) and c:IsOnField() and c:IsRace(RACE_AQUA) return c:IsControler(tp) and c:IsRace(RACE_AQUA)
and c:IsReason(REASON_EFFECT) and c:IsReason(REASON_BATTLE) and not c:IsReason(REASON_REPLACE) and (c:IsReason(REASON_EFFECT) or c:IsReason(REASON_BATTLE)) and not c:IsReason(REASON_REPLACE)
end end
function cm.desreptg(e,tp,eg,ep,ev,re,r,rp,chk) function cm.desreptg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler() local c=e:GetHandler()
......
...@@ -73,6 +73,9 @@ function cm.filter2(c,e,tp,m,f,chkf) ...@@ -73,6 +73,9 @@ function cm.filter2(c,e,tp,m,f,chkf)
return c:IsType(TYPE_FUSION) and (not f or f(c)) return c:IsType(TYPE_FUSION) and (not f or f(c))
and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_FUSION,tp,false,false) and c:CheckFusionMaterial(m,nil,chkf) and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_FUSION,tp,false,false) and c:CheckFusionMaterial(m,nil,chkf)
end end
function cm.filter5(c)
return aux.IsCodeListed(c,m-9)
end
function cm.fcheck(tp,sg,fc) function cm.fcheck(tp,sg,fc)
return sg:IsExists(cm.filter5,1,nil) return sg:IsExists(cm.filter5,1,nil)
end end
......
...@@ -188,7 +188,6 @@ function cm.filter4(c) ...@@ -188,7 +188,6 @@ function cm.filter4(c)
end end
function cm.sptg3(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function cm.sptg3(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then return Duel.IsExistingMatchingCard(cm.filter4,tp,LOCATION_MZONE+LOCATION_GRAVE,LOCATION_MZONE+LOCATION_GRAVE,1,nil) end if chk==0 then return Duel.IsExistingMatchingCard(cm.filter4,tp,LOCATION_MZONE+LOCATION_GRAVE,LOCATION_MZONE+LOCATION_GRAVE,1,nil) end
local rc=re:GetHandler()
end end
function cm.spop3(e,tp,eg,ep,ev,re,r,rp) function cm.spop3(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
......
...@@ -98,6 +98,7 @@ end ...@@ -98,6 +98,7 @@ end
function s.operation(e,tp,eg,ep,ev,re,r,rp) function s.operation(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if not e:GetHandler():IsRelateToEffect(e) then return end if not e:GetHandler():IsRelateToEffect(e) then return end
if not tc:IsRelateToEffect(e) then return end
local c= e:GetHandler() local c= e:GetHandler()
if tc and Duel.GetLocationCount(tp,LOCATION_SZONE)>1 then if tc and Duel.GetLocationCount(tp,LOCATION_SZONE)>1 then
Duel.MoveToField(c,tp,tp,LOCATION_SZONE,POS_FACEUP,true) Duel.MoveToField(c,tp,tp,LOCATION_SZONE,POS_FACEUP,true)
......
...@@ -55,7 +55,7 @@ function c4204018.initial_effect(c) ...@@ -55,7 +55,7 @@ function c4204018.initial_effect(c)
e11:SetOperation(function(e,tp,eg,ep,ev,re,r,rp) e11:SetOperation(function(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_CARD,0,id) Duel.Hint(HINT_CARD,0,id)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(function(c) return aux.IsCodeListed(c,4204000) and c:IsAbleToHand() end),tp,LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil) local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(function(c) return aux.IsCodeListed(c,4204000) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand() end),tp,LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil)
if #g>0 then if #g>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g) Duel.ConfirmCards(1-tp,g)
......
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