Commit 8822579a authored by mercury233's avatar mercury233

fix

parent 24b29f88
Pipeline #23427 passed with stages
in 39 seconds
...@@ -14,6 +14,7 @@ function s.initial_effect(c) ...@@ -14,6 +14,7 @@ function s.initial_effect(c)
e1:SetCondition(s.spscon) e1:SetCondition(s.spscon)
e1:SetTarget(s.spstg) e1:SetTarget(s.spstg)
e1:SetOperation(s.spsop) e1:SetOperation(s.spsop)
e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_MAIN_END)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--spsummon --spsummon
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
......
...@@ -22,7 +22,7 @@ function s.initial_effect(c) ...@@ -22,7 +22,7 @@ function s.initial_effect(c)
e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL) e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL)
e2:SetCode(EVENT_CHAINING) e2:SetCode(EVENT_CHAINING)
e2:SetRange(LOCATION_MZONE) e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,id+id) e2:SetCountLimit(1,id+o)
e2:SetCondition(s.negcon) e2:SetCondition(s.negcon)
e2:SetTarget(s.negtg) e2:SetTarget(s.negtg)
e2:SetOperation(s.negop) e2:SetOperation(s.negop)
......
...@@ -12,6 +12,7 @@ function s.initial_effect(c) ...@@ -12,6 +12,7 @@ function s.initial_effect(c)
e2:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD) e2:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_DESTROY_REPLACE) e2:SetCode(EFFECT_DESTROY_REPLACE)
e2:SetRange(LOCATION_SZONE) e2:SetRange(LOCATION_SZONE)
e2:SetCountLimit(1)
e2:SetTarget(s.desreptg) e2:SetTarget(s.desreptg)
e2:SetValue(s.desrepval) e2:SetValue(s.desrepval)
e2:SetOperation(s.desrepop) e2:SetOperation(s.desrepop)
......
...@@ -14,7 +14,7 @@ function s.initial_effect(c) ...@@ -14,7 +14,7 @@ function s.initial_effect(c)
e2:SetType(EFFECT_TYPE_QUICK_O) e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN) e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_GRAVE) e2:SetRange(LOCATION_GRAVE)
e2:SetCountLimit(1,id+id) e2:SetCountLimit(1,id+o)
e2:SetCost(aux.bfgcost) e2:SetCost(aux.bfgcost)
e2:SetOperation(s.operation) e2:SetOperation(s.operation)
c:RegisterEffect(e2) c:RegisterEffect(e2)
......
...@@ -51,11 +51,11 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -51,11 +51,11 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.SelectMatchingCard(tp,s.filter,tp,LOCATION_DECK+LOCATION_HAND,0,1,1,nil,e,tp) local g=Duel.SelectMatchingCard(tp,s.filter,tp,LOCATION_DECK+LOCATION_HAND,0,1,1,nil,e,tp)
Duel.SpecialSummon(g,0,tp,tp,true,false,POS_FACEUP) Duel.SpecialSummon(g,0,tp,tp,true,false,POS_FACEUP)
end end
function s.mfilter(c) function s.mfilter(c,tp)
return c:IsSetCard(0x2a1) and c:IsType(TYPE_MONSTER) return c:IsSetCard(0x2a1) and c:IsType(TYPE_MONSTER) and c:IsPreviousControler(tp)
end end
function s.spcon(e,tp,eg,ep,ev,re,r,rp) function s.spcon(e,tp,eg,ep,ev,re,r,rp)
return rp==1-tp and eg:IsExists(s.mfilter,1,nil) return rp==1-tp and eg:IsExists(s.mfilter,1,nil,tp)
end end
function s.sfilter(c,e,tp) function s.sfilter(c,e,tp)
return c:IsSetCard(0x2a1) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) return c:IsSetCard(0x2a1) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
......
...@@ -17,7 +17,7 @@ function s.initial_effect(c) ...@@ -17,7 +17,7 @@ function s.initial_effect(c)
e2:SetCategory(CATEGORY_DESTROY) e2:SetCategory(CATEGORY_DESTROY)
e2:SetType(EFFECT_TYPE_IGNITION) e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_MZONE) e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,id+EFFECT_COUNT_CODE_OATH) e2:SetCountLimit(1,id)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET) e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetTarget(s.destg) e2:SetTarget(s.destg)
e2:SetOperation(s.desop) e2:SetOperation(s.desop)
......
...@@ -48,9 +48,9 @@ function s.lacon(e,tp,eg,ep,ev,re,r,rp) ...@@ -48,9 +48,9 @@ function s.lacon(e,tp,eg,ep,ev,re,r,rp)
end end
function s.latg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function s.latg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsFaceup() end if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsFaceup() end
if chk==0 then return Duel.IsExistingTarget(nil,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end if chk==0 then return Duel.IsExistingTarget(Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
Duel.SelectTarget(tp,nil,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) Duel.SelectTarget(tp,Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
end end
function s.laop(e,tp,eg,ep,ev,re,r,rp) function s.laop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
......
...@@ -6,7 +6,7 @@ function s.initial_effect(c) ...@@ -6,7 +6,7 @@ function s.initial_effect(c)
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,0)) e1:SetDescription(aux.Stringid(id,0))
e1:SetCategory(CATEGORY_TOHAND) e1:SetCategory(CATEGORY_TOHAND)
e1:SetType(EFFECT_FLAG_CARD_TARGET) e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN) e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,id+EFFECT_COUNT_CODE_OATH) e1:SetCountLimit(1,id+EFFECT_COUNT_CODE_OATH)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
......
...@@ -18,6 +18,7 @@ function s.initial_effect(c) ...@@ -18,6 +18,7 @@ function s.initial_effect(c)
e2:SetDescription(aux.Stringid(id,1)) e2:SetDescription(aux.Stringid(id,1))
e2:SetCategory(CATEGORY_DESTROY+CATEGORY_SEARCH+CATEGORY_TOHAND) e2:SetCategory(CATEGORY_DESTROY+CATEGORY_SEARCH+CATEGORY_TOHAND)
e2:SetType(EFFECT_TYPE_IGNITION) e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetRange(LOCATION_MZONE) e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,id+o) e2:SetCountLimit(1,id+o)
e2:SetTarget(s.thtg) e2:SetTarget(s.thtg)
......
...@@ -16,7 +16,7 @@ function s.initial_effect(c) ...@@ -16,7 +16,7 @@ function s.initial_effect(c)
e2:SetCategory(CATEGORY_POSITION) e2:SetCategory(CATEGORY_POSITION)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_DESTROYED) e2:SetCode(EVENT_DESTROYED)
e2:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_DAMAGE_STEP) e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCountLimit(1,id+1) e2:SetCountLimit(1,id+1)
e2:SetCondition(s.condition) e2:SetCondition(s.condition)
e2:SetTarget(s.target) e2:SetTarget(s.target)
...@@ -37,6 +37,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) ...@@ -37,6 +37,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp)
Duel.ChangePosition(g,POS_FACEDOWN_DEFENSE) Duel.ChangePosition(g,POS_FACEDOWN_DEFENSE)
local g1=Duel.GetMatchingGroup(Card.IsFaceup,tp,0,LOCATION_ONFIELD,nil) local g1=Duel.GetMatchingGroup(Card.IsFaceup,tp,0,LOCATION_ONFIELD,nil)
if g1:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(id,1)) then if g1:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(id,1)) then
Duel.BreakEffect()
Duel.SendtoGrave(g1,REASON_EFFECT) Duel.SendtoGrave(g1,REASON_EFFECT)
end end
end end
......
...@@ -36,14 +36,13 @@ function s.filter(c) ...@@ -36,14 +36,13 @@ function s.filter(c)
end end
function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local b=Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_MZONE,0,1,nil) local b=Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_MZONE,0,1,nil)
if chkc then return chkc:IsLocation(LOCATION_ONFIELD) and (chkc:IsControler(tp) if chkc then return chkc:IsLocation(LOCATION_ONFIELD) and (chkc:IsControler(tp) or b) and chkc:IsCanTurnSet() end
or b) and chkc:IsCanTurnSet() end local loc2=0
local loc=0 if b then loc2=LOCATION_MZONE end
if b then loc=LOCATION_MZONE end if chk==0 then return Duel.IsExistingTarget(Card.IsCanTurnSet,tp,LOCATION_MZONE,loc2,1,nil)
if chk==0 then return Duel.IsExistingTarget(Card.IsCanTurnSet,tp,LOCATION_MZONE,loc,1,nil)
and Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_DECK,0,1,nil) end and Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_DECK,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_POSCHANGE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_POSCHANGE)
local g=Duel.SelectTarget(tp,Card.IsCanTurnSet,tp,LOCATION_MZONE,loc,1,1,nil) local g=Duel.SelectTarget(tp,Card.IsCanTurnSet,tp,LOCATION_MZONE,loc2,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_POSITION,g,1,0,0) Duel.SetOperationInfo(0,CATEGORY_POSITION,g,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end end
......
...@@ -39,7 +39,10 @@ function s.rvtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) ...@@ -39,7 +39,10 @@ function s.rvtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
local tc=Duel.SelectTarget(tp,s.filter,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,1,nil,e,tp):GetFirst() local tc=Duel.SelectTarget(tp,s.filter,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,1,nil,e,tp):GetFirst()
if tc:IsLocation(LOCATION_GRAVE) then if tc:IsLocation(LOCATION_GRAVE) then
e:SetCategory(CATEGORY_TOHAND+CATEGORY_SPECIAL_SUMMON+CATEGORY_GRAVE_ACTION+CATEGORY_GRAVE_SPSUMMON)
Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,tc,1,0,0) Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,tc,1,0,0)
else
e:SetCategory(CATEGORY_TOHAND+CATEGORY_SPECIAL_SUMMON)
end end
end end
function s.rvop(e,tp,eg,ep,ev,re,r,rp) function s.rvop(e,tp,eg,ep,ev,re,r,rp)
......
...@@ -42,7 +42,7 @@ end ...@@ -42,7 +42,7 @@ end
function s.filter(c,tp) function s.filter(c,tp)
local r=LOCATION_REASON_TOFIELD local r=LOCATION_REASON_TOFIELD
if not c:IsControler(c:GetOwner()) then r=LOCATION_REASON_CONTROL end if not c:IsControler(c:GetOwner()) then r=LOCATION_REASON_CONTROL end
return (c:IsType(TYPE_MONSTER) or c:IsLocation(LOCATION_MZONE)) return (c:IsType(TYPE_MONSTER) or c:IsLocation(LOCATION_MZONE)) and c:IsFaceupEx()
and Duel.GetLocationCount(c:GetOwner(),LOCATION_SZONE,tp,r)>0 and Duel.GetLocationCount(c:GetOwner(),LOCATION_SZONE,tp,r)>0
end end
function s.mvtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function s.mvtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
......
...@@ -45,7 +45,6 @@ s.toss_coin=true ...@@ -45,7 +45,6 @@ s.toss_coin=true
function s.drtg(e,tp,eg,ep,ev,re,r,rp,chk) function s.drtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsPlayerCanDraw(tp) end if chk==0 then return Duel.IsPlayerCanDraw(tp) end
Duel.SetOperationInfo(0,CATEGORY_COIN,nil,0,tp,0) Duel.SetOperationInfo(0,CATEGORY_COIN,nil,0,tp,0)
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
end end
function s.drop(e,tp,eg,ep,ev,re,r,rp) function s.drop(e,tp,eg,ep,ev,re,r,rp)
local heads=0 local heads=0
...@@ -58,7 +57,6 @@ function s.drop(e,tp,eg,ep,ev,re,r,rp) ...@@ -58,7 +57,6 @@ function s.drop(e,tp,eg,ep,ev,re,r,rp)
end end
function s.atktg(e,tp,eg,ep,ev,re,r,rp,chk) function s.atktg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end if chk==0 then return true end
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
end end
function s.atkop(e,tp,eg,ep,ev,re,r,rp) function s.atkop(e,tp,eg,ep,ev,re,r,rp)
if ev==0 then return end if ev==0 then return end
......
...@@ -66,11 +66,10 @@ function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -66,11 +66,10 @@ function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,ct,tp,LOCATION_DECK) Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,ct,tp,LOCATION_DECK)
end end
function s.thop(e,tp,eg,ep,ev,re,r,rp) function s.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.GetMatchingGroup(s.thfilter,tp,LOCATION_DECK,0,nil) local g=Duel.GetMatchingGroup(s.thfilter,tp,LOCATION_DECK,0,nil)
if g:GetCount()>0 then if g:GetCount()>0 then
local ct=e:GetLabel() local ct=e:GetLabel()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local sg=g:SelectSubGroup(tp,aux.dncheck,false,ct,ct) local sg=g:SelectSubGroup(tp,aux.dncheck,false,ct,ct)
if sg then if sg then
Duel.SendtoHand(sg,nil,REASON_EFFECT) Duel.SendtoHand(sg,nil,REASON_EFFECT)
......
...@@ -43,10 +43,10 @@ function s.gchk(g) ...@@ -43,10 +43,10 @@ function s.gchk(g)
return g:IsExists(Card.IsType,1,nil,TYPE_PENDULUM) return g:IsExists(Card.IsType,1,nil,TYPE_PENDULUM)
end end
function s.afilter(c) function s.afilter(c)
return c:IsFaceup() and c:IsType(TYPE_PENDULUM) return c:IsFaceup() and c:GetOriginalType()&TYPE_PENDULUM~=0
end end
function s.val(e,c) function s.val(e,c)
return Duel.GetMatchingGroupCount(s.afilter,c:GetControler(),LOCATION_ONFIELD,0,nil)*100 return Duel.GetMatchingGroupCount(s.afilter,e:GetHandlerPlayer(),LOCATION_ONFIELD,0,nil)*100
end end
function s.thcon(e,tp,eg,ep,ev,re,r,rp) function s.thcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_LINK) return e:GetHandler():IsSummonType(SUMMON_TYPE_LINK)
......
...@@ -52,7 +52,7 @@ function s.target(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -52,7 +52,7 @@ function s.target(e,tp,eg,ep,ev,re,r,rp,chk)
local b1=Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,nil) local b1=Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,nil)
local b2=Duel.IsExistingMatchingCard(s.sfilter,tp,LOCATION_DECK,0,1,nil) local b2=Duel.IsExistingMatchingCard(s.sfilter,tp,LOCATION_DECK,0,1,nil)
if chk==0 then return b1 or b2 end if chk==0 then return b1 or b2 end
local op=aux.SelectFromOptions(tp,{b1,1190},{b2,1159}) local op=aux.SelectFromOptions(tp,{b1,1190},{b2,1153})
if op==1 then if op==1 then
e:SetCategory(CATEGORY_TOHAND) e:SetCategory(CATEGORY_TOHAND)
e:SetOperation(s.retrieve) e:SetOperation(s.retrieve)
......
...@@ -32,7 +32,7 @@ function s.initial_effect(c) ...@@ -32,7 +32,7 @@ function s.initial_effect(c)
end end
function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToHand,tp,LOCATION_DECK,0,1,nil) if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToHand,tp,LOCATION_DECK,0,1,nil)
and Duel.IsExistingMatchingCard(Card.IsAbleToHand,tp,0,LOCATION_DECK,1,nil) end and Duel.IsExistingMatchingCard(Card.IsAbleToHand,tp,0,LOCATION_DECK,1,nil,1-tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CARDTYPE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CARDTYPE)
Duel.SetTargetParam(Duel.AnnounceType(tp)) Duel.SetTargetParam(Duel.AnnounceType(tp))
end end
...@@ -45,7 +45,7 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) ...@@ -45,7 +45,7 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp)
local op=Duel.GetChainInfo(0,CHAININFO_TARGET_PARAM) local op=Duel.GetChainInfo(0,CHAININFO_TARGET_PARAM)
if sc:IsType(1<<op) then Duel.SendtoHand(sc,nil,REASON_EFFECT) if sc:IsType(1<<op) then Duel.SendtoHand(sc,nil,REASON_EFFECT)
else Duel.MoveSequence(sc,SEQ_DECKTOP) end else Duel.MoveSequence(sc,SEQ_DECKTOP) end
if oc:IsType(1<<op) then Duel.SendtoHand(oc,nil,REASON_EFFECT) if oc:IsType(1<<op) then Duel.SendtoHand(oc,nil,REASON_EFFECT,1-tp)
else Duel.MoveSequence(oc,SEQ_DECKTOP) end else Duel.MoveSequence(oc,SEQ_DECKTOP) end
end end
function s.tdcon(e,tp,eg,ep,ev,re,r,rp) function s.tdcon(e,tp,eg,ep,ev,re,r,rp)
......
...@@ -65,11 +65,11 @@ end ...@@ -65,11 +65,11 @@ end
function s.eqop(e,tp,eg,ep,ev,re,r,rp) function s.eqop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 then return end if Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 then return end
local c=e:GetHandler() local c=e:GetHandler()
local tg=Duel.GetTargetsRelateToChain() local tc=Duel.GetTargetsRelateToChain():GetFirst()
local tc=tg:Filter(Card.IsLocation,nil,LOCATION_MZONE):GetFirst() if not tc then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
local ec=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.eqfilter),tp,LOCATION_MZONE+LOCATION_GRAVE,0,1,1,tc,tp):GetFirst() local ec=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.eqfilter),tp,LOCATION_MZONE+LOCATION_GRAVE,0,1,1,tc,tp):GetFirst()
if tc and ec and ec:CheckUniqueOnField(tp) and not ec:IsForbidden() then if ec and Duel.Equip(tp,ec,tc)then
if not Duel.Equip(tp,ec,tc) then return end
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
...@@ -78,17 +78,17 @@ function s.eqop(e,tp,eg,ep,ev,re,r,rp) ...@@ -78,17 +78,17 @@ function s.eqop(e,tp,eg,ep,ev,re,r,rp)
e1:SetValue(s.eqlimit) e1:SetValue(s.eqlimit)
e1:SetReset(RESET_EVENT+RESETS_STANDARD) e1:SetReset(RESET_EVENT+RESETS_STANDARD)
ec:RegisterEffect(e1) ec:RegisterEffect(e1)
local e2=Effect.CreateEffect(c) --
local e2=Effect.CreateEffect(ec)
e2:SetType(EFFECT_TYPE_EQUIP) e2:SetType(EFFECT_TYPE_EQUIP)
e2:SetCode(EFFECT_UPDATE_ATTACK) e2:SetCode(EFFECT_UPDATE_ATTACK)
e2:SetValue(ec:GetAttack()) e2:SetValue(ec:GetAttack())
e2:SetReset(RESET_EVENT+RESETS_STANDARD) e2:SetReset(RESET_EVENT+RESETS_STANDARD)
ec:RegisterEffect(e2) ec:RegisterEffect(e2,true)
--substitute --substitute
local e3=Effect.CreateEffect(c) local e3=Effect.CreateEffect(ec)
e3:SetType(EFFECT_TYPE_EQUIP) e3:SetType(EFFECT_TYPE_EQUIP)
e3:SetCode(EFFECT_DESTROY_SUBSTITUTE) e3:SetCode(EFFECT_DESTROY_SUBSTITUTE)
e3:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE)
e3:SetReset(RESET_EVENT+RESETS_STANDARD) e3:SetReset(RESET_EVENT+RESETS_STANDARD)
e3:SetValue(s.desrepval) e3:SetValue(s.desrepval)
ec:RegisterEffect(e3,true) ec:RegisterEffect(e3,true)
......
...@@ -45,6 +45,7 @@ function c101202073.cost(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -45,6 +45,7 @@ function c101202073.cost(e,tp,eg,ep,ev,re,r,rp,chk)
local rc=g:GetFirst() local rc=g:GetFirst()
if rc:IsType(TYPE_TOKEN) then return end if rc:IsType(TYPE_TOKEN) then return end
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(101202073,2))
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_PHASE+PHASE_END) e1:SetCode(EVENT_PHASE+PHASE_END)
e1:SetReset(RESET_PHASE+PHASE_END) e1:SetReset(RESET_PHASE+PHASE_END)
...@@ -69,6 +70,7 @@ function c101202073.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -69,6 +70,7 @@ function c101202073.activate(e,tp,eg,ep,ev,re,r,rp)
local fid=tc:GetFieldID() local fid=tc:GetFieldID()
tc:RegisterFlagEffect(101202073,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1,fid) tc:RegisterFlagEffect(101202073,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1,fid)
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(101202073,3))
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_PHASE+PHASE_END) e1:SetCode(EVENT_PHASE+PHASE_END)
e1:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE) e1:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE)
......
...@@ -40,11 +40,12 @@ function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -40,11 +40,12 @@ function s.cost(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SendtoGrave(g,REASON_COST) Duel.SendtoGrave(g,REASON_COST)
end end
function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsOnField() and aux.NegateAnyFilter(chkc) end local c=e:GetHandler()
if chkc then return chkc:IsOnField() and aux.NegateAnyFilter(chkc) and c~=chkc end
if chk==0 then return e:IsCostChecked() if chk==0 then return e:IsCostChecked()
or Duel.IsExistingTarget(aux.NegateAnyFilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end or Duel.IsExistingTarget(aux.NegateAnyFilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,c) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
Duel.SelectTarget(tp,aux.NegateAnyFilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil) Duel.SelectTarget(tp,aux.NegateAnyFilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,c)
end end
function s.activate(e,tp,eg,ep,ev,re,r,rp) function s.activate(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
......
...@@ -21,9 +21,12 @@ function s.condition(e,tp,eg,ep,ev,re,r,rp) ...@@ -21,9 +21,12 @@ function s.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetMatchingGroup(s.cfilter,tp,LOCATION_MZONE,0,nil):GetSum(Card.GetLevel)>1 return Duel.GetMatchingGroup(s.cfilter,tp,LOCATION_MZONE,0,nil):GetSum(Card.GetLevel)>1
end end
function s.mfilter(c,tp,ft) function s.mfilter(c,tp,ft)
if not (c:IsFaceupEx() and c:GetOriginalType()&TYPE_MONSTER>0) then return false end
local p=c:GetOwner()
if p~=tp then ft=0 end
local r=LOCATION_REASON_TOFIELD local r=LOCATION_REASON_TOFIELD
if not c:IsControler(c:GetOwner()) then r=LOCATION_REASON_CONTROL end if not c:IsControler(p) then r=LOCATION_REASON_CONTROL end
return c:GetOriginalType()&TYPE_MONSTER>0 and Duel.GetLocationCount(c:GetOwner(),LOCATION_SZONE,tp,r)>0 return Duel.GetLocationCount(p,LOCATION_SZONE,tp,r)>ft
end end
function s.sfilter(c,e,tp) function s.sfilter(c,e,tp)
return c:GetOriginalType()&TYPE_MONSTER>0 and c:GetType()&TYPE_CONTINUOUS+TYPE_SPELL==TYPE_CONTINUOUS+TYPE_SPELL return c:GetOriginalType()&TYPE_MONSTER>0 and c:GetType()&TYPE_CONTINUOUS+TYPE_SPELL==TYPE_CONTINUOUS+TYPE_SPELL
...@@ -46,7 +49,7 @@ function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) ...@@ -46,7 +49,7 @@ function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
e:SetCategory(0) e:SetCategory(0)
e:SetOperation(s.mvop) e:SetOperation(s.mvop)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
Duel.SelectTarget(tp,s.mfilter,tp,0,LOCATION_MZONE+LOCATION_GRAVE,1,1,nil,tp,ft) Duel.SelectTarget(tp,s.mfilter,tp,0,LOCATION_MZONE+LOCATION_GRAVE,1,1,nil,tp,0)
else else
e:SetCategory(CATEGORY_SPECIAL_SUMMON) e:SetCategory(CATEGORY_SPECIAL_SUMMON)
e:SetOperation(s.spop) e:SetOperation(s.spop)
......
...@@ -31,6 +31,7 @@ function s.initial_effect(c) ...@@ -31,6 +31,7 @@ function s.initial_effect(c)
e3:SetHintTiming(0,TIMING_END_PHASE) e3:SetHintTiming(0,TIMING_END_PHASE)
e3:SetRange(LOCATION_SZONE) e3:SetRange(LOCATION_SZONE)
e3:SetCountLimit(1,id) e3:SetCountLimit(1,id)
e3:SetCondition(s.effcon)
e3:SetCost(s.effcost) e3:SetCost(s.effcost)
e3:SetOperation(s.changeop) e3:SetOperation(s.changeop)
e3:SetLabel(2) e3:SetLabel(2)
...@@ -44,6 +45,7 @@ function s.initial_effect(c) ...@@ -44,6 +45,7 @@ function s.initial_effect(c)
e4:SetHintTiming(0,TIMING_END_PHASE) e4:SetHintTiming(0,TIMING_END_PHASE)
e4:SetRange(LOCATION_SZONE) e4:SetRange(LOCATION_SZONE)
e4:SetCountLimit(1,id) e4:SetCountLimit(1,id)
e4:SetCondition(s.effcon)
e4:SetCost(s.effcost) e4:SetCost(s.effcost)
e4:SetTarget(s.tgtg) e4:SetTarget(s.tgtg)
e4:SetOperation(s.tgop) e4:SetOperation(s.tgop)
......
...@@ -35,7 +35,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -35,7 +35,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp)
local f=aux.FALSE local f=aux.FALSE
local typ=tc:GetType()&TYPE_FUSION+TYPE_SYNCHRO+TYPE_XYZ+TYPE_LINK local typ=tc:GetType()&TYPE_FUSION+TYPE_SYNCHRO+TYPE_XYZ+TYPE_LINK
if typ==TYPE_FUSION then f=aux.FilterEqualFunction(Card.GetAttribute,tc:GetAttribute()) if typ==TYPE_FUSION then f=aux.FilterEqualFunction(Card.GetAttribute,tc:GetAttribute())
elseif typ==TYPE_SYNCHRO then f=aux.FilterBoolFunction(Card.IsLevelBelow,tc:GetLevel()) elseif typ==TYPE_SYNCHRO then f=aux.FilterBoolFunction(Card.IsLevelBelow,tc:GetLevel()-1)
elseif typ==TYPE_XYZ then f=aux.FilterBoolFunction(Card.IsLevel,tc:GetRank()) elseif typ==TYPE_XYZ then f=aux.FilterBoolFunction(Card.IsLevel,tc:GetRank())
elseif typ==TYPE_LINK then f=aux.FilterEqualFunction(Card.GetRace,tc:GetRace()) end elseif typ==TYPE_LINK then f=aux.FilterEqualFunction(Card.GetRace,tc:GetRace()) end
local g=Duel.GetMatchingGroup(s.sfilter,tp,LOCATION_GRAVE,LOCATION_GRAVE,nil,e,tp,f) local g=Duel.GetMatchingGroup(s.sfilter,tp,LOCATION_GRAVE,LOCATION_GRAVE,nil,e,tp,f)
......
...@@ -12,6 +12,7 @@ function s.initial_effect(c) ...@@ -12,6 +12,7 @@ function s.initial_effect(c)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_DELAY) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_DELAY)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_SPSUMMON_SUCCESS) e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetCountLimit(1,id)
e1:SetCondition(s.dmgcon) e1:SetCondition(s.dmgcon)
e1:SetTarget(s.damtg) e1:SetTarget(s.damtg)
e1:SetOperation(s.dmgop) e1:SetOperation(s.dmgop)
......
...@@ -174,6 +174,6 @@ function s.op5(e,tp,eg,ep,ev,re,r,rp) ...@@ -174,6 +174,6 @@ function s.op5(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.SelectMatchingCard(tp,s.filter5,tp,LOCATION_DECK,0,1,1,nil,e,tp) local g=Duel.SelectMatchingCard(tp,s.filter5,tp,LOCATION_DECK,0,1,1,nil,e,tp)
if g:GetCount()>0 then if g:GetCount()>0 then
Duel.SendtoHand(g:GetFirst(),nil,REASON_EFFECT) Duel.SendtoHand(g:GetFirst(),nil,REASON_EFFECT)
Duel.ShuffleDeck(tp) Duel.ConfirmCards(1-tp,g)
end end
end end
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