Commit 01fd2bb0 authored by Huangnan's avatar Huangnan

fix

parent 0015e0bd
Pipeline #24242 passed with stages
in 27 minutes and 29 seconds
...@@ -27,16 +27,16 @@ function cm.initial_effect(c) ...@@ -27,16 +27,16 @@ function cm.initial_effect(c)
e2:SetOperation(cm.tgop) e2:SetOperation(cm.tgop)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
function cm.filter(c,tp) function cm.filter(c)
return (c:IsLocation(LOCATION_GRAVE+LOCATION_REMOVED) or not c:IsControler(tp)) and c:IsCanOverlay() return c:IsCanOverlay()
end end
function cm.tg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function cm.tg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local loc=LOCATION_GRAVE+LOCATION_REMOVED local loc=LOCATION_GRAVE+LOCATION_REMOVED
if e:GetHandler():GetOverlayCount()>=10 then loc=LOCATION_GRAVE+LOCATION_REMOVED+LOCATION_ONFIELD end if e:GetHandler():GetOverlayCount()>=10 then loc=LOCATION_GRAVE+LOCATION_REMOVED+LOCATION_ONFIELD end
if chkc then return chkc:IsLocation(loc) and cm.filter(chkc,tp) end if chkc then return (chkc:IsLocation(LOCATION_GRAVE+LOCATION_REMOVED) and c:IsControler(tp) and c:IsCanOverlay()) or (chkc:IsLocation(loc) and c:IsControler(1-tp) and c:IsCanOverlay()) end
if chk==0 then return Duel.IsExistingTarget(cm.filter,tp,loc,loc,1,nil,tp) and e:GetHandler():IsType(TYPE_XYZ) end if chk==0 then return Duel.IsExistingTarget(cm.filter,tp,LOCATION_GRAVE+LOCATION_REMOVED,loc,1,nil) and e:GetHandler():IsType(TYPE_XYZ) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_XMATERIAL) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_XMATERIAL)
Duel.SelectTarget(tp,cm.filter,tp,loc,loc,1,1,nil,tp) Duel.SelectTarget(tp,cm.filter,tp,LOCATION_GRAVE+LOCATION_REMOVED,loc,1,1,nil)
end end
function cm.op(e,tp,eg,ep,ev,re,r,rp) function cm.op(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
...@@ -77,10 +77,10 @@ function cm.tgop(e,tp,eg,ep,ev,re,r,rp) ...@@ -77,10 +77,10 @@ function cm.tgop(e,tp,eg,ep,ev,re,r,rp)
if e:GetHandler():GetOverlayCount()>=10 and Duel.IsPlayerCanDraw(tp,1) then if e:GetHandler():GetOverlayCount()>=10 and Duel.IsPlayerCanDraw(tp,1) then
Duel.Draw(tp,1,REASON_EFFECT) Duel.Draw(tp,1,REASON_EFFECT)
end end
if g1:GetFirst():GetAttribute()==ATTRIBUTE_WATER and Duel.IsPlayerCanDraw(tp,1) then if g1 and g1:GetFirst():GetAttribute()==ATTRIBUTE_WATER and Duel.IsPlayerCanDraw(tp,1) then
Duel.Draw(tp,1,REASON_EFFECT) Duel.Draw(tp,1,REASON_EFFECT)
end end
if Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0)>=3 and Duel.IsPlayerCanDraw(tp,1) then if Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0)==3 and Duel.IsPlayerCanDraw(tp,1) then
Duel.Draw(tp,1,REASON_EFFECT) Duel.Draw(tp,1,REASON_EFFECT)
end end
end end
......
...@@ -23,7 +23,7 @@ function s.initial_effect(c) ...@@ -23,7 +23,7 @@ function s.initial_effect(c)
e4:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOKEN) e4:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOKEN)
e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e4:SetCode(EVENT_SPSUMMON_SUCCESS) e4:SetCode(EVENT_SPSUMMON_SUCCESS)
e4:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CANNOT_DISABLE) e4:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CANNOT_INACTIVATE+EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CANNOT_NEGATE)
e4:SetTarget(s.sptg) e4:SetTarget(s.sptg)
e4:SetOperation(s.spop) e4:SetOperation(s.spop)
c:RegisterEffect(e4) c:RegisterEffect(e4)
...@@ -32,7 +32,7 @@ function s.initial_effect(c) ...@@ -32,7 +32,7 @@ function s.initial_effect(c)
e6:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOKEN) e6:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOKEN)
e6:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) e6:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e6:SetCode(EVENT_SUMMON_SUCCESS) e6:SetCode(EVENT_SUMMON_SUCCESS)
e6:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CANNOT_DISABLE) e6:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CANNOT_INACTIVATE+EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CANNOT_NEGATE)
e6:SetTarget(s.sptg) e6:SetTarget(s.sptg)
e6:SetOperation(s.spop) e6:SetOperation(s.spop)
c:RegisterEffect(e6) c:RegisterEffect(e6)
......
...@@ -23,7 +23,7 @@ function s.initial_effect(c) ...@@ -23,7 +23,7 @@ function s.initial_effect(c)
e4:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOKEN) e4:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOKEN)
e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e4:SetCode(EVENT_SPSUMMON_SUCCESS) e4:SetCode(EVENT_SPSUMMON_SUCCESS)
e4:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CANNOT_DISABLE) e4:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CANNOT_INACTIVATE+EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CANNOT_NEGATE)
e4:SetTarget(s.sptg) e4:SetTarget(s.sptg)
e4:SetOperation(s.spop) e4:SetOperation(s.spop)
c:RegisterEffect(e4) c:RegisterEffect(e4)
...@@ -32,7 +32,7 @@ function s.initial_effect(c) ...@@ -32,7 +32,7 @@ function s.initial_effect(c)
e41:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOKEN) e41:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOKEN)
e41:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) e41:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e41:SetCode(EVENT_SUMMON_SUCCESS) e41:SetCode(EVENT_SUMMON_SUCCESS)
e41:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CANNOT_DISABLE) e41:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CANNOT_INACTIVATE+EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CANNOT_NEGATE)
e41:SetTarget(s.sptg) e41:SetTarget(s.sptg)
e41:SetOperation(s.spop) e41:SetOperation(s.spop)
c:RegisterEffect(e41) c:RegisterEffect(e41)
......
...@@ -96,7 +96,7 @@ end ...@@ -96,7 +96,7 @@ end
function cm.negcon(e,tp,eg,ep,ev,re,r,rp) function cm.negcon(e,tp,eg,ep,ev,re,r,rp)
if ep==tp or e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED) then return false end if ep==tp or e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED) then return false end
local g=Duel.GetMatchingGroup(Card.IsType,tp,LOCATION_GRAVE,LOCATION_GRAVE,nil,TYPE_MONSTER) local g=Duel.GetMatchingGroup(Card.IsType,tp,LOCATION_GRAVE,LOCATION_GRAVE,nil,TYPE_MONSTER)
return g:GetClassCount(Card.GetAttribute)>=6 and re:IsActiveType(TYPE_SPELL+TYPE_TRAP) and Duel.IsChainNegatable(ev) return g:GetClassCount(Card.GetAttribute)>=4 and re:IsActiveType(TYPE_SPELL+TYPE_TRAP) and Duel.IsChainNegatable(ev)
end end
function cm.negtg(e,tp,eg,ep,ev,re,r,rp,chk) function cm.negtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return aux.nbcon(tp,re) end if chk==0 then return aux.nbcon(tp,re) end
......
--魔王剑-残酷 --魔王剑-残酷
if not pcall(function() require("expansions/script/c16199990") end) then require("script/c16101100") end
local m=33400345 local m=33400345
local cm=_G["c"..m] local cm=_G["c"..m]
function cm.initial_effect(c) function cm.initial_effect(c)
......
...@@ -6,7 +6,6 @@ function c98650000.initial_effect(c) ...@@ -6,7 +6,6 @@ function c98650000.initial_effect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON) e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_IGNITION) e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_HAND) e1:SetRange(LOCATION_HAND)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCost(c98650000.cost) e1:SetCost(c98650000.cost)
e1:SetTarget(c98650000.target) e1:SetTarget(c98650000.target)
...@@ -14,29 +13,15 @@ function c98650000.initial_effect(c) ...@@ -14,29 +13,15 @@ function c98650000.initial_effect(c)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--spsummon --spsummon
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(98650000,1)) e2:SetType(EFFECT_TYPE_TRIGGER_O+EFFECT_TYPE_SINGLE)
e2:SetCategory(CATEGORY_SPECIAL_SUMMON) e2:SetCode(EVENT_SUMMON_SUCCESS)
e2:SetType(EFFECT_TYPE_IGNITION) e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetRange(LOCATION_MZONE) e2:SetTarget(c98650000.thtg)
e2:SetCountLimit(1) e2:SetOperation(c98650000.thop)
e2:SetCondition(c98650000.spcon)
e2:SetTarget(c98650000.sptg)
e2:SetOperation(c98650000.spop)
c:RegisterEffect(e2) c:RegisterEffect(e2)
if not c98650000.global_check then local e3=e2:Clone()
c98650000.global_check=true e3:SetCode(EVENT_SPSUMMON_SUCCESS)
local ge1=Effect.CreateEffect(c) c:RegisterEffect(e3)
ge1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
ge1:SetCode(EVENT_SUMMON_SUCCESS)
ge1:SetLabel(98650000)
ge1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
ge1:SetOperation(aux.sumreg)
Duel.RegisterEffect(ge1,0)
local ge2=ge1:Clone()
ge2:SetCode(EVENT_SPSUMMON_SUCCESS)
ge2:SetLabel(98650000)
Duel.RegisterEffect(ge2,0)
end
end end
function c98650000.cost(e,tp,eg,ep,ev,re,r,rp,chk) function c98650000.cost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler() local c=e:GetHandler()
...@@ -66,22 +51,18 @@ function c98650000.operation(e,tp,eg,ep,ev,re,r,rp) ...@@ -66,22 +51,18 @@ function c98650000.operation(e,tp,eg,ep,ev,re,r,rp)
end end
end end
end end
function c98650000.spcon(e,tp,eg,ep,ev,re,r,rp) function c98650000.filter2(c)
return e:GetHandler():GetFlagEffect(98650000)>0 return c:GetAttack()==1850 and c:IsAbleToHand() and c:IsRace(RACE_SPELLCASTER)
end
function c98650000.spfilter(c,e,tp)
return c:GetAttack()==1850 and c:IsRace(RACE_SPELLCASTER) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end end
function c98650000.sptg(e,tp,eg,ep,ev,re,r,rp,chk) function c98650000.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 if chk==0 then return Duel.IsExistingMatchingCard(c98650000.filter2,tp,LOCATION_DECK,0,1,nil) end
and Duel.IsExistingMatchingCard(c98650000.spfilter,tp,LOCATION_HAND,0,1,nil,e,tp) end Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND)
end end
function c98650000.spop(e,tp,eg,ep,ev,re,r,rp) function c98650000.thop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) local g=Duel.SelectMatchingCard(tp,c98650000.filter2,tp,LOCATION_DECK,0,1,1,nil)
local g=Duel.SelectMatchingCard(tp,c98650000.spfilter,tp,LOCATION_HAND,0,1,1,nil,e,tp) if g:GetCount()<=0 then return end
if g:GetCount()>0 then local tc=g:GetFirst()
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP_ATTACK) Duel.SendtoHand(tc,nil,REASON_EFFECT)
end Duel.ConfirmCards(1-tp,tc)
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