Commit 41771b29 authored by mercury233's avatar mercury233

fix

parent 9cb2c777
Pipeline #17376 passed with stages
in 34 seconds
...@@ -4,7 +4,6 @@ local s,id,o=GetID() ...@@ -4,7 +4,6 @@ local s,id,o=GetID()
function c101110082.initial_effect(c) function c101110082.initial_effect(c)
--special summon --special summon
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetDescription(2)
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)
......
...@@ -25,7 +25,7 @@ function s.initial_effect(c) ...@@ -25,7 +25,7 @@ function s.initial_effect(c)
e2:SetCategory(CATEGORY_SPECIAL_SUMMON) e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_SPSUMMON_SUCCESS) e2:SetCode(EVENT_SPSUMMON_SUCCESS)
e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY) e2:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY)
e2:SetCountLimit(1,id+o) e2:SetCountLimit(1,id+o)
e2:SetTarget(s.sptg2) e2:SetTarget(s.sptg2)
e2:SetOperation(s.spop2) e2:SetOperation(s.spop2)
......
...@@ -25,7 +25,7 @@ function s.initial_effect(c) ...@@ -25,7 +25,7 @@ function s.initial_effect(c)
e2:SetCategory(CATEGORY_SPECIAL_SUMMON) e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_SPSUMMON_SUCCESS) e2:SetCode(EVENT_SPSUMMON_SUCCESS)
e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY) e2:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY)
e2:SetCountLimit(1,id+o) e2:SetCountLimit(1,id+o)
e2:SetTarget(s.sptg2) e2:SetTarget(s.sptg2)
e2:SetOperation(s.spop2) e2:SetOperation(s.spop2)
......
...@@ -7,6 +7,7 @@ function s.initial_effect(c) ...@@ -7,6 +7,7 @@ function s.initial_effect(c)
e1:SetDescription(aux.Stringid(id,0)) e1:SetDescription(aux.Stringid(id,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON) e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_IGNITION) e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetRange(LOCATION_MZONE) e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1,id) e1:SetCountLimit(1,id)
e1:SetTarget(s.sptg) e1:SetTarget(s.sptg)
...@@ -43,19 +44,17 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) ...@@ -43,19 +44,17 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp)
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_DISABLE) e1:SetCode(EFFECT_DISABLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD) e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1,true) tc:RegisterEffect(e1,true)
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE) e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_DISABLE_EFFECT) e2:SetCode(EFFECT_DISABLE_EFFECT)
e2:SetValue(RESET_TURN_SET) e2:SetValue(RESET_TURN_SET)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e2:SetReset(RESET_EVENT+RESETS_STANDARD) e2:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e2,true) tc:RegisterEffect(e2,true)
end end
Duel.SpecialSummonComplete() Duel.SpecialSummonComplete()
local e1=Effect.CreateEffect(e:GetHandler()) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD) e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
......
...@@ -8,21 +8,22 @@ function c101111014.initial_effect(c) ...@@ -8,21 +8,22 @@ function c101111014.initial_effect(c)
e1:SetType(EFFECT_TYPE_IGNITION) e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetRange(LOCATION_HAND+LOCATION_GRAVE) e1:SetRange(LOCATION_HAND+LOCATION_GRAVE)
e1:SetCountLimit(1,101111014)
e1:SetCondition(c101111014.sscon) e1:SetCondition(c101111014.sscon)
e1:SetTarget(c101111014.eqtg) e1:SetTarget(c101111014.eqtg)
e1:SetOperation(c101111014.eqop) e1:SetOperation(c101111014.eqop)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--Atk up --Atk up
local e3=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_EQUIP) e2:SetType(EFFECT_TYPE_EQUIP)
e3:SetCode(EFFECT_UPDATE_ATTACK) e2:SetCode(EFFECT_UPDATE_ATTACK)
e3:SetCondition(c101111014.condition) e2:SetCondition(c101111014.condition)
e3:SetValue(1500) e2:SetValue(1500)
c:RegisterEffect(e2)
local e3=e2:Clone()
e3:SetCode(EFFECT_UPDATE_DEFENSE)
e3:SetValue(2000)
c:RegisterEffect(e3) c:RegisterEffect(e3)
local e4=e3:Clone()
e4:SetCode(EFFECT_UPDATE_DEFENSE)
e4:SetValue(2000)
c:RegisterEffect(e4)
end end
function c101111014.sfilter(c) function c101111014.sfilter(c)
return c:IsCode(101111014) and c:IsFaceup() return c:IsCode(101111014) and c:IsFaceup()
...@@ -41,6 +42,9 @@ function c101111014.eqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) ...@@ -41,6 +42,9 @@ function c101111014.eqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
and Duel.IsExistingTarget(c101111014.filter,tp,LOCATION_MZONE,0,1,c) end and Duel.IsExistingTarget(c101111014.filter,tp,LOCATION_MZONE,0,1,c) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
Duel.SelectTarget(tp,c101111014.filter,tp,LOCATION_MZONE,0,1,1,c) Duel.SelectTarget(tp,c101111014.filter,tp,LOCATION_MZONE,0,1,1,c)
if c:IsLocation(LOCATION_GRAVE) then
Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,c,0,0,0)
end
end end
function c101111014.eqop(e,tp,eg,ep,ev,re,r,rp) function c101111014.eqop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
......
...@@ -88,7 +88,6 @@ function c101111015.eqop(e,tp,eg,ep,ev,re,r,rp) ...@@ -88,7 +88,6 @@ function c101111015.eqop(e,tp,eg,ep,ev,re,r,rp)
local e3=e2:Clone() local e3=e2:Clone()
e3:SetCode(EFFECT_UPDATE_DEFENSE) e3:SetCode(EFFECT_UPDATE_DEFENSE)
tc:RegisterEffect(e3) tc:RegisterEffect(e3)
tc:RegisterFlagEffect(101111015,RESET_EVENT+RESETS_STANDARD,0,0)
end end
end end
function c101111015.eqlimit(e,c) function c101111015.eqlimit(e,c)
......
...@@ -27,6 +27,7 @@ function c101111016.initial_effect(c) ...@@ -27,6 +27,7 @@ function c101111016.initial_effect(c)
--to deck --to deck
local e3=Effect.CreateEffect(c) local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(101111016,2)) e3:SetDescription(aux.Stringid(101111016,2))
e3:SetCategory(CATEGORY_TODECK)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_DESTROYED) e3:SetCode(EVENT_DESTROYED)
e3:SetProperty(EFFECT_FLAG_DELAY) e3:SetProperty(EFFECT_FLAG_DELAY)
......
...@@ -26,7 +26,7 @@ function s.initial_effect(c) ...@@ -26,7 +26,7 @@ function s.initial_effect(c)
e4:SetCode(EVENT_FLIP) e4:SetCode(EVENT_FLIP)
e4:SetRange(LOCATION_MZONE) e4:SetRange(LOCATION_MZONE)
e4:SetCountLimit(1,id+o) e4:SetCountLimit(1,id+o)
e4:SetProperty(EFFECT_FLAG_DELAY) e4:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET)
e4:SetCondition(s.descon) e4:SetCondition(s.descon)
e4:SetTarget(s.destg) e4:SetTarget(s.destg)
e4:SetOperation(s.desop) e4:SetOperation(s.desop)
...@@ -55,7 +55,7 @@ function s.posop(e,tp,eg,ep,ev,re,r,rp) ...@@ -55,7 +55,7 @@ function s.posop(e,tp,eg,ep,ev,re,r,rp)
end end
end end
function s.descon(e,tp,eg,ep,ev,re,r,rp) function s.descon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(aux.TRUE,1,e:GetHandler()) return not eg:IsContains(e:GetHandler())
end end
function s.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function s.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsOnField() and chkc:IsControler(1-tp) end if chkc then return chkc:IsOnField() and chkc:IsControler(1-tp) end
......
...@@ -55,7 +55,7 @@ function c101111021.chainop(e,tp,eg,ep,ev,re,r,rp) ...@@ -55,7 +55,7 @@ function c101111021.chainop(e,tp,eg,ep,ev,re,r,rp)
end end
end end
function c101111021.chainlm(re,rp,tp) function c101111021.chainlm(re,rp,tp)
return tp==rp or not re:GetHandler():IsType(TYPE_MONSTER) return tp==rp or not re:IsActiveType(TYPE_MONSTER)
end end
function c101111021.desfilter(c) function c101111021.desfilter(c)
return c:IsFaceup() and not c:IsRace(RACE_INSECT+RACE_PLANT) return c:IsFaceup() and not c:IsRace(RACE_INSECT+RACE_PLANT)
......
...@@ -3,6 +3,7 @@ ...@@ -3,6 +3,7 @@
function c101111022.initial_effect(c) function c101111022.initial_effect(c)
--search --search
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(101111022,0))
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e1:SetType(EFFECT_TYPE_IGNITION) e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE) e1:SetRange(LOCATION_MZONE)
...@@ -12,18 +13,18 @@ function c101111022.initial_effect(c) ...@@ -12,18 +13,18 @@ function c101111022.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(101111022,0)) e2:SetDescription(aux.Stringid(101111022,1))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON) e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_IGNITION) e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_GRAVE) e2:SetRange(LOCATION_GRAVE)
e2:SetCost(c101111022.cost)
e2:SetCountLimit(1,101110122) e2:SetCountLimit(1,101110122)
e2:SetCost(c101111022.cost)
e2:SetTarget(c101111022.sptg) e2:SetTarget(c101111022.sptg)
e2:SetOperation(c101111022.spop) e2:SetOperation(c101111022.spop)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
function c101111022.filter(c) function c101111022.filter(c)
return c:IsCode(97169186,66788016) return c:IsCode(97169186,66788016) and c:IsAbleToHand()
end end
function c101111022.target(e,tp,eg,ep,ev,re,r,rp,chk) function c101111022.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c101111022.filter,tp,LOCATION_DECK,0,1,nil) end if chk==0 then return Duel.IsExistingMatchingCard(c101111022.filter,tp,LOCATION_DECK,0,1,nil) end
......
...@@ -5,7 +5,7 @@ function c101111023.initial_effect(c) ...@@ -5,7 +5,7 @@ function c101111023.initial_effect(c)
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(101111023,0)) e1:SetDescription(aux.Stringid(101111023,0))
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e1:SetType(EFFECT_TYPE_TRIGGER_O+EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetProperty(EFFECT_FLAG_DELAY) e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCode(EVENT_SUMMON_SUCCESS) e1:SetCode(EVENT_SUMMON_SUCCESS)
e1:SetCountLimit(1,101111023) e1:SetCountLimit(1,101111023)
......
...@@ -44,16 +44,16 @@ end ...@@ -44,16 +44,16 @@ end
function s.target(e,tp,eg,ep,ev,re,r,rp,chk) function s.target(e,tp,eg,ep,ev,re,r,rp,chk)
local ct=Duel.GetFieldGroupCount(tp,0,LOCATION_EXTRA) local ct=Duel.GetFieldGroupCount(tp,0,LOCATION_EXTRA)
local g=Duel.GetMatchingGroup(s.tefilter,tp,0,LOCATION_MZONE,nil) local g=Duel.GetMatchingGroup(s.tefilter,tp,0,LOCATION_MZONE,nil)
local b1 = ct>=2 and Duel.IsExistingMatchingCard(Card.IsAbleToGrave,tp,0,LOCATION_HAND+LOCATION_EXTRA,math.floor(ct/2),nil) local b1=ct>=2 and Duel.IsExistingMatchingCard(Card.IsAbleToGrave,tp,0,LOCATION_HAND+LOCATION_EXTRA,math.floor(ct/2),nil)
local b2 = #g>0 and not g:IsExists(aux.NOT(Card.IsAbleToExtra),1,nil) local b2=#g>0 and not g:IsExists(aux.NOT(Card.IsAbleToExtra),1,nil)
if chk==0 then return b1 or b2 end if chk==0 then return b1 or b2 end
end end
function s.operation(e,tp,eg,ep,ev,re,r,rp) function s.operation(e,tp,eg,ep,ev,re,r,rp)
local ct=Duel.GetFieldGroupCount(tp,0,LOCATION_EXTRA) local ct=Duel.GetFieldGroupCount(tp,0,LOCATION_EXTRA)
local halfct=math.floor(ct/2) local halfct=math.floor(ct/2)
local g=Duel.GetMatchingGroup(s.tefilter,tp,0,LOCATION_MZONE,nil) local g=Duel.GetMatchingGroup(s.tefilter,tp,0,LOCATION_MZONE,nil)
local b1 = ct>=2 and Duel.IsExistingMatchingCard(Card.IsAbleToGrave,tp,0,LOCATION_HAND+LOCATION_EXTRA,halfct,nil) local b1=ct>=2 and Duel.IsExistingMatchingCard(Card.IsAbleToGrave,tp,0,LOCATION_HAND+LOCATION_EXTRA,halfct,nil)
local b2 = #g>0 and not g:IsExists(aux.NOT(Card.IsAbleToExtra),1,nil) local b2=#g>0 and not g:IsExists(aux.NOT(Card.IsAbleToExtra),1,nil)
if not b1 and not b2 then return end if not b1 and not b2 then return end
local off=1 local off=1
local ops={} local ops={}
......
...@@ -43,7 +43,6 @@ function c101111032.spfilter(c,e,tp) ...@@ -43,7 +43,6 @@ function c101111032.spfilter(c,e,tp)
return c:IsAttribute(ATTRIBUTE_WATER) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) return c:IsAttribute(ATTRIBUTE_WATER) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end end
function c101111032.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c101111032.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local c=e:GetHandler()
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c101111032.spfilter(chkc,e,tp) end if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c101111032.spfilter(chkc,e,tp) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingTarget(c101111032.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end and Duel.IsExistingTarget(c101111032.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end
...@@ -68,13 +67,19 @@ function c101111032.filter(c) ...@@ -68,13 +67,19 @@ function c101111032.filter(c)
return c:IsSetCard(0x3a) and c:IsType(TYPE_RITUAL) and c:IsAbleToHand() and c:IsFaceup() return c:IsSetCard(0x3a) and c:IsType(TYPE_RITUAL) and c:IsAbleToHand() and c:IsFaceup()
end end
function c101111032.negtg(e,tp,eg,ep,ev,re,r,rp,chk) function c101111032.negtg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler() local rc=re:GetHandler()
if chk==0 then return Duel.IsExistingMatchingCard(c101111032.filter,tp,LOCATION_MZONE,0,1,nil) end if chk==0 then return (not rc:IsRelateToEffect(re) or rc:IsAbleToDeck())
and Duel.IsExistingMatchingCard(c101111032.filter,tp,LOCATION_MZONE,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_MZONE) Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_MZONE)
Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0) Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0)
if re:GetHandler():IsAbleToDeck() and re:GetHandler():IsRelateToEffect(re) then if rc:IsRelateToEffect(re) then
Duel.SetOperationInfo(0,CATEGORY_TODECK,eg,1,0,0) Duel.SetOperationInfo(0,CATEGORY_TODECK,eg,1,0,0)
end end
if re:GetActivateLocation()==LOCATION_GRAVE then
e:SetCategory(e:GetCategory()|CATEGORY_GRAVE_ACTION)
else
e:SetCategory(e:GetCategory()&~CATEGORY_GRAVE_ACTION)
end
end end
function c101111032.negop(e,tp,eg,ep,ev,re,r,rp) function c101111032.negop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND)
......
...@@ -53,8 +53,7 @@ function s.tgop(e,tp,eg,ep,ev,re,r,rp) ...@@ -53,8 +53,7 @@ function s.tgop(e,tp,eg,ep,ev,re,r,rp)
end end
end end
function s.cfilter(c,tp,re) function s.cfilter(c,tp,re)
local rc=re:GetHandler() return re and re:IsActivated() and re:IsActiveType(TYPE_MONSTER) and c:IsSummonPlayer(1-tp)
return re and re:IsActivated() and rc:IsType(TYPE_MONSTER) and c:IsSummonPlayer(1-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 eg:IsExists(s.cfilter,1,nil,tp,re) return eg:IsExists(s.cfilter,1,nil,tp,re)
......
...@@ -72,6 +72,7 @@ function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) ...@@ -72,6 +72,7 @@ function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0)
end end
function s.spop(e,tp,eg,ep,ev,re,r,rp) function s.spop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
local fg=(Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS)+e:GetHandler()):Filter(Card.IsRelateToEffect,nil,e) local fg=(Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS)+e:GetHandler()):Filter(Card.IsRelateToEffect,nil,e)
if fg:GetCount()~=2 then return end if fg:GetCount()~=2 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
......
...@@ -31,7 +31,6 @@ function s.initial_effect(c) ...@@ -31,7 +31,6 @@ function s.initial_effect(c)
c:RegisterEffect(e3) c:RegisterEffect(e3)
--destroy --destroy
local e4=Effect.CreateEffect(c) local e4=Effect.CreateEffect(c)
e4:SetDescription(1101)
e4:SetCategory(CATEGORY_DESTROY) e4:SetCategory(CATEGORY_DESTROY)
e4:SetType(EFFECT_TYPE_QUICK_O) e4:SetType(EFFECT_TYPE_QUICK_O)
e4:SetCode(EVENT_FREE_CHAIN) e4:SetCode(EVENT_FREE_CHAIN)
......
...@@ -65,11 +65,10 @@ end ...@@ -65,11 +65,10 @@ end
function s.petg(e,tp,eg,ep,ev,re,r,rp,chk) function s.petg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler() local c=e:GetHandler()
local zone=1<<c:GetSequence() local zone=1<<c:GetSequence()
local b1 = zone~=0 and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP,tp,zone) local b1=zone~=0 and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP,tp,zone)
local b2 = Duel.IsExistingMatchingCard(s.pfilter,tp,LOCATION_MZONE,0,1,nil) local b2=Duel.IsExistingMatchingCard(s.pfilter,tp,LOCATION_MZONE,0,1,nil)
if chk==0 then return b1 or b2 end if chk==0 then return b1 or b2 end
e:SetCategory(0) e:SetCategory(0)
if not b1 and not b2 then return end
local off=1 local off=1
local ops={} local ops={}
local opval={} local opval={}
......
...@@ -12,7 +12,7 @@ function s.initial_effect(c) ...@@ -12,7 +12,7 @@ function s.initial_effect(c)
e1:SetCode(EVENT_FREE_CHAIN) e1:SetCode(EVENT_FREE_CHAIN)
e1:SetRange(LOCATION_MZONE) e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1,id) e1:SetCountLimit(1,id)
e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE) e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER)
e1:SetTarget(s.target) e1:SetTarget(s.target)
e1:SetOperation(s.operation) e1:SetOperation(s.operation)
c:RegisterEffect(e1) c:RegisterEffect(e1)
...@@ -48,12 +48,13 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) ...@@ -48,12 +48,13 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp)
e1:SetValue(aux.indoval) e1:SetValue(aux.indoval)
e1:SetReset(RESET_PHASE+PHASE_END) e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp) Duel.RegisterEffect(e1,tp)
local e2=e1:Clone() local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e2:SetCode(EFFECT_CANNOT_REMOVE) e2:SetCode(EFFECT_CANNOT_REMOVE)
e2:SetTargetRange(1,1) e2:SetTargetRange(1,1)
e2:SetTarget(s.efilter) e2:SetTarget(s.efilter)
e2:SetValue(0) e2:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e2,tp) Duel.RegisterEffect(e2,tp)
local ch=Duel.GetCurrentChain() local ch=Duel.GetCurrentChain()
if ch>1 then if ch>1 then
...@@ -84,7 +85,7 @@ function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -84,7 +85,7 @@ function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler() local c=e:GetHandler()
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,tp,LOCATION_GRAVE) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,0,0)
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()
......
...@@ -19,7 +19,7 @@ function s.initial_effect(c) ...@@ -19,7 +19,7 @@ function s.initial_effect(c)
--search --search
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(id,1)) e2:SetDescription(aux.Stringid(id,1))
e2:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND+CATEGORY_SPECIAL_SUMMON) e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH+CATEGORY_SPECIAL_SUMMON+CATEGORY_DECKDES)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_DELAY) e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCode(EVENT_SPSUMMON_SUCCESS) e2:SetCode(EVENT_SPSUMMON_SUCCESS)
......
...@@ -56,7 +56,7 @@ function c101111043.atkop(e,tp,eg,ep,ev,re,r,rp) ...@@ -56,7 +56,7 @@ function c101111043.atkop(e,tp,eg,ep,ev,re,r,rp)
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_EXTRA_ATTACK_MONSTER) e1:SetCode(EFFECT_EXTRA_ATTACK_MONSTER)
e1:SetValue(2) e1:SetValue(2)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_DISABLE+RESET_PHASE+PHASE_END) e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_DISABLE+RESET_PHASE+PHASE_BATTLE)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
end end
......
...@@ -24,7 +24,7 @@ function c101111045.initial_effect(c) ...@@ -24,7 +24,7 @@ function c101111045.initial_effect(c)
e2:SetCode(EVENT_DETACH_MATERIAL) e2:SetCode(EVENT_DETACH_MATERIAL)
e2:SetRange(LOCATION_MZONE) e2:SetRange(LOCATION_MZONE)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY) e2:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY)
e2:SetCountLimit(1,101111046) e2:SetCountLimit(1,101111045+100)
e2:SetCondition(c101111045.descon) e2:SetCondition(c101111045.descon)
e2:SetTarget(c101111045.destg) e2:SetTarget(c101111045.destg)
e2:SetOperation(c101111045.desop) e2:SetOperation(c101111045.desop)
...@@ -59,13 +59,10 @@ function c101111045.descon(e,tp,eg,ep,ev,re,r,rp) ...@@ -59,13 +59,10 @@ function c101111045.descon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(Card.IsLocation,1,nil,LOCATION_ONFIELD+LOCATION_OVERLAY) return eg:IsExists(Card.IsLocation,1,nil,LOCATION_ONFIELD+LOCATION_OVERLAY)
end end
function c101111045.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c101111045.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_ONFIELD) end if chkc then return chkc:IsOnField() end
if chk==0 then return Duel.IsExistingTarget(aux.TRUE,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end if chk==0 then return Duel.IsExistingTarget(aux.TRUE,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
local g=Duel.SelectTarget(tp,aux.TRUE,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil) local g=Duel.SelectTarget(tp,aux.TRUE,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil)
if not g:GetFirst():IsAbleToHand() then
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
end
end end
function c101111045.desop(e,tp,eg,ep,ev,re,r,rp) function c101111045.desop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
......
...@@ -2,7 +2,6 @@ ...@@ -2,7 +2,6 @@
--Script by 奥克斯 & mercury233 --Script by 奥克斯 & mercury233
local s,id,o=GetID() local s,id,o=GetID()
function s.initial_effect(c) function s.initial_effect(c)
aux.AddCodeList(c,73542331)
--xyz summon --xyz summon
aux.AddXyzProcedure(c,nil,7,3,s.ovfilter,aux.Stringid(id,0),3,s.xyzop) aux.AddXyzProcedure(c,nil,7,3,s.ovfilter,aux.Stringid(id,0),3,s.xyzop)
c:EnableReviveLimit() c:EnableReviveLimit()
...@@ -19,7 +18,6 @@ function s.initial_effect(c) ...@@ -19,7 +18,6 @@ function s.initial_effect(c)
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(id,1)) e2:SetDescription(aux.Stringid(id,1))
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetRange(LOCATION_MZONE) e2:SetRange(LOCATION_MZONE)
e2:SetCode(EVENT_REMOVE) e2:SetCode(EVENT_REMOVE)
e2:SetCondition(s.mtcon) e2:SetCondition(s.mtcon)
......
...@@ -64,6 +64,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) ...@@ -64,6 +64,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp)
local xg=mg:Select(tp,1,ct,nil) local xg=mg:Select(tp,1,ct,nil)
local tc1=xg:GetFirst() local tc1=xg:GetFirst()
while tc1 do while tc1 do
tc1:CancelToGrave()
local og=tc1:GetOverlayGroup() local og=tc1:GetOverlayGroup()
if #og>0 then if #og>0 then
Duel.SendtoGrave(og,REASON_RULE) Duel.SendtoGrave(og,REASON_RULE)
......
...@@ -5,7 +5,7 @@ local s,id,o=GetID() ...@@ -5,7 +5,7 @@ local s,id,o=GetID()
function s.initial_effect(c) function s.initial_effect(c)
c:EnableReviveLimit() c:EnableReviveLimit()
--material --material
aux.AddLinkProcedure(c,aux.FilterBoolFunction(Card.IsRace,RACE_BEAST+RACE_BEASTWARRIOR+RACE_WINDBEAST),3,99,s.spchk(c)) aux.AddLinkProcedure(c,aux.FilterBoolFunction(Card.IsRace,RACE_BEAST+RACE_BEASTWARRIOR+RACE_WINDBEAST),3,99,s.spchk)
--splimit --splimit
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
...@@ -14,28 +14,28 @@ function s.initial_effect(c) ...@@ -14,28 +14,28 @@ function s.initial_effect(c)
e1:SetValue(s.splimit) e1:SetValue(s.splimit)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--actlimit --actlimit
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
e2:SetRange(LOCATION_MZONE)
e2:SetCondition(s.limcon)
e2:SetOperation(s.limop)
c:RegisterEffect(e2)
local e3=Effect.CreateEffect(c) local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e3:SetCode(EVENT_SPSUMMON_SUCCESS) e3:SetRange(LOCATION_SZONE)
e3:SetRange(LOCATION_MZONE) e3:SetCode(EVENT_CHAIN_END)
e3:SetCondition(s.limcon) e3:SetOperation(s.limop2)
e3:SetOperation(s.limop)
c:RegisterEffect(e3) c:RegisterEffect(e3)
--remove
local e4=Effect.CreateEffect(c) local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) e4:SetCategory(CATEGORY_REMOVE)
e4:SetRange(LOCATION_SZONE) e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e4:SetCode(EVENT_CHAIN_END) e4:SetCode(EVENT_ATTACK_ANNOUNCE)
e4:SetOperation(s.limop2) e4:SetRange(LOCATION_MZONE)
e4:SetTarget(s.rmtg)
e4:SetOperation(s.rmop)
c:RegisterEffect(e4) c:RegisterEffect(e4)
--remove
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_REMOVE)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_ATTACK_ANNOUNCE)
e2:SetRange(LOCATION_MZONE)
e2:SetTarget(s.rmtg)
e2:SetOperation(s.rmop)
c:RegisterEffect(e2)
--send to GY --send to GY
local e5=Effect.CreateEffect(c) local e5=Effect.CreateEffect(c)
e5:SetCategory(CATEGORY_TOGRAVE) e5:SetCategory(CATEGORY_TOGRAVE)
...@@ -47,13 +47,18 @@ function s.initial_effect(c) ...@@ -47,13 +47,18 @@ function s.initial_effect(c)
e5:SetOperation(s.tgop) e5:SetOperation(s.tgop)
c:RegisterEffect(e5) c:RegisterEffect(e5)
end end
--pre update
function Auxiliary.LCheckGoal(sg,tp,lc,gf,lmat)
return sg:CheckWithSumEqual(Auxiliary.GetLinkCount,lc:GetLink(),#sg,#sg)
and Duel.GetLocationCountFromEx(tp,tp,sg,lc)>0 and (not gf or gf(sg,lc,tp))
and not sg:IsExists(Auxiliary.LUncompatibilityFilter,1,nil,sg,lc,tp)
and (not lmat or sg:IsContains(lmat))
end
function s.cfilter(c) function s.cfilter(c)
return c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsSetCard(0x14d) return c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsSetCard(0x14d)
end end
function s.spchk(c) function s.spchk(g,lc,tp)
return function(g) return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_GRAVE,0,3,nil)
return Duel.IsExistingMatchingCard(s.cfilter,c:GetControler(),LOCATION_GRAVE,0,3,nil)
end
end end
function s.splimit(e,se,sp,st,pos,tp) function s.splimit(e,se,sp,st,pos,tp)
return not e:GetHandler():IsLocation(LOCATION_EXTRA) return not e:GetHandler():IsLocation(LOCATION_EXTRA)
......
...@@ -12,6 +12,7 @@ function s.initial_effect(c) ...@@ -12,6 +12,7 @@ function s.initial_effect(c)
e1:SetType(EFFECT_TYPE_QUICK_O) e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_FREE_CHAIN) e1:SetCode(EVENT_FREE_CHAIN)
e1:SetRange(LOCATION_MZONE) e1:SetRange(LOCATION_MZONE)
e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_MAIN_END)
e1:SetCountLimit(1,id) e1:SetCountLimit(1,id)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCondition(s.dtfcon) e1:SetCondition(s.dtfcon)
...@@ -27,7 +28,9 @@ function s.dtfcon(e,tp,eg,ep,ev,re,r,rp) ...@@ -27,7 +28,9 @@ function s.dtfcon(e,tp,eg,ep,ev,re,r,rp)
return ph==PHASE_MAIN1 or ph==PHASE_MAIN2 return ph==PHASE_MAIN1 or ph==PHASE_MAIN2
end end
function s.filter(c,tp) function s.filter(c,tp)
return (c:IsCode(77297908) or c:IsSetCard(0x10ec) and c:IsType(TYPE_PENDULUM) and (Duel.CheckLocation(tp,LOCATION_PZONE,0) or Duel.CheckLocation(tp,LOCATION_PZONE,1))) and not c:IsForbidden() and c:CheckUniqueOnField(tp) return (c:IsCode(77297908) or c:IsSetCard(0x10ec) and c:IsType(TYPE_PENDULUM)
and (Duel.CheckLocation(tp,LOCATION_PZONE,0) or Duel.CheckLocation(tp,LOCATION_PZONE,1)))
and not c:IsForbidden() and c:CheckUniqueOnField(tp)
end end
function s.dtftg(e,tp,eg,ep,ev,re,r,rp,chk) function s.dtftg(e,tp,eg,ep,ev,re,r,rp,chk)
if chkc then return chkc:IsOnField() and chkc:IsControler(tp) and chkc:IsFaceup() end if chkc then return chkc:IsOnField() and chkc:IsControler(tp) and chkc:IsFaceup() end
......
...@@ -30,7 +30,6 @@ end ...@@ -30,7 +30,6 @@ end
function c101111052.activate(e,tp,eg,ep,ev,re,r,rp) function c101111052.activate(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetFlagEffect(tp,101111052)~=0 then return end if Duel.GetFlagEffect(tp,101111052)~=0 then return end
Duel.RegisterFlagEffect(tp,101111052,RESET_PHASE+PHASE_END,0,1) Duel.RegisterFlagEffect(tp,101111052,RESET_PHASE+PHASE_END,0,1)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
local c=e:GetHandler() local c=e:GetHandler()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local tc=Duel.SelectMatchingCard(tp,c101111052.spfilter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp):GetFirst() local tc=Duel.SelectMatchingCard(tp,c101111052.spfilter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp):GetFirst()
......
...@@ -84,7 +84,7 @@ function s.rmtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) ...@@ -84,7 +84,7 @@ function s.rmtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then return Duel.IsExistingTarget(Card.IsAbleToRemove,tp,0,LOCATION_ONFIELD,1,nil) end if chk==0 then return Duel.IsExistingTarget(Card.IsAbleToRemove,tp,0,LOCATION_ONFIELD,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectTarget(tp,Card.IsAbleToRemove,tp,0,LOCATION_ONFIELD,1,1,nil) local g=Duel.SelectTarget(tp,Card.IsAbleToRemove,tp,0,LOCATION_ONFIELD,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,#g,1-tp,LOCATION_ONFIELD) Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,#g,0,0)
end end
function s.rmop(e,tp,eg,ep,ev,re,r,rp) function s.rmop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
......
...@@ -8,20 +8,22 @@ function c101111054.initial_effect(c) ...@@ -8,20 +8,22 @@ function c101111054.initial_effect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN) e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,101111054) e1:SetCountLimit(1,101111054)
e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e1:SetCost(c101111054.cost) e1:SetCost(c101111054.cost)
e1:SetTarget(c101111054.target) e1:SetTarget(c101111054.target)
e1:SetOperation(c101111054.activate) e1:SetOperation(c101111054.activate)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--material --material
local e3=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(101111054,3)) e2:SetDescription(aux.Stringid(101111054,3))
e3:SetType(EFFECT_TYPE_IGNITION) e2:SetCategory(CATEGORY_TOHAND)
e3:SetProperty(EFFECT_FLAG_CARD_TARGET) e2:SetType(EFFECT_TYPE_IGNITION)
e3:SetRange(LOCATION_GRAVE) e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e3:SetCountLimit(1,101111054) e2:SetRange(LOCATION_GRAVE)
e3:SetTarget(c101111054.mattg) e2:SetCountLimit(1,101111054)
e3:SetOperation(c101111054.matop) e2:SetTarget(c101111054.mattg)
c:RegisterEffect(e3) e2:SetOperation(c101111054.matop)
c:RegisterEffect(e2)
end end
function c101111054.cost(e,tp,eg,ep,ev,re,r,rp,chk) function c101111054.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end if chk==0 then return true end
...@@ -38,9 +40,15 @@ end ...@@ -38,9 +40,15 @@ end
function c101111054.target(e,tp,eg,ep,ev,re,r,rp,chk) function c101111054.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c101111054.thfilter,tp,LOCATION_DECK,0,1,nil) end if chk==0 then return Duel.IsExistingMatchingCard(c101111054.thfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
local spct=e:GetLabel()
if spct>0 then
e:SetCategory(e:GetCategory()|CATEGORY_GRAVE_SPSUMMON|CATEGORY_SPECIAL_SUMMON)
else
e:SetCategory(e:GetCategory()&~(CATEGORY_GRAVE_SPSUMMON|CATEGORY_SPECIAL_SUMMON))
end
end end
function c101111054.spfilter(c,e,tp) function c101111054.spfilter(c,e,tp)
return c:IsSetCard(0x155) and c:IsType(TYPE_MONSTER) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) return c:IsSetCard(0x155) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end end
function c101111054.activate(e,tp,eg,ep,ev,re,r,rp) function c101111054.activate(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
...@@ -65,10 +73,12 @@ function c101111054.matfilter(c,tp) ...@@ -65,10 +73,12 @@ function c101111054.matfilter(c,tp)
end end
function c101111054.mattg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c101111054.mattg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and c101111054.matfilter(chkc,tp) end if chkc then return chkc:IsLocation(LOCATION_MZONE) and c101111054.matfilter(chkc,tp) end
if chk==0 then return Duel.IsExistingTarget(c101111054.matfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil,tp) end local c=e:GetHandler()
if chk==0 then return c:IsAbleToHand()
and Duel.IsExistingTarget(c101111054.matfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
local g=Duel.SelectTarget(tp,c101111054.matfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil,tp) local g=Duel.SelectTarget(tp,c101111054.matfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil,tp)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,e:GetHandler(),1,0,0) Duel.SetOperationInfo(0,CATEGORY_TOHAND,c,1,0,0)
end end
function c101111054.matop(e,tp,eg,ep,ev,re,r,rp) function c101111054.matop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
......
...@@ -27,7 +27,6 @@ function s.thfilter(c,specify) ...@@ -27,7 +27,6 @@ function s.thfilter(c,specify)
return c:IsSetCard(0x145) and (not specify or (c:IsType(TYPE_RITUAL) and c:IsType(TYPE_MONSTER+TYPE_SPELL))) and c:IsAbleToHand() return c:IsSetCard(0x145) and (not specify or (c:IsType(TYPE_RITUAL) and c:IsType(TYPE_MONSTER+TYPE_SPELL))) and c:IsAbleToHand()
end end
function s.activate(e,tp,eg,ep,ev,re,r,rp) function s.activate(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) then return end
local g=Duel.GetMatchingGroup(s.thfilter,tp,LOCATION_DECK,0,nil,true) local g=Duel.GetMatchingGroup(s.thfilter,tp,LOCATION_DECK,0,nil,true)
if #g>0 and Duel.SelectYesNo(tp,aux.Stringid(id,0)) then if #g>0 and Duel.SelectYesNo(tp,aux.Stringid(id,0)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
...@@ -66,7 +65,6 @@ function s.tgfilter(c) ...@@ -66,7 +65,6 @@ function s.tgfilter(c)
return c:IsType(TYPE_MONSTER) and c:IsAbleToGrave() return c:IsType(TYPE_MONSTER) and c:IsAbleToGrave()
end end
function s.tgop(e,tp,eg,ep,ev,re,r,rp) function s.tgop(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) then return end
local g1=Duel.GetFieldGroup(tp,LOCATION_EXTRA,0) local g1=Duel.GetFieldGroup(tp,LOCATION_EXTRA,0)
local g2=Duel.GetFieldGroup(tp,0,LOCATION_EXTRA) local g2=Duel.GetFieldGroup(tp,0,LOCATION_EXTRA)
if #g1==0 and #g2==0 then return end if #g1==0 and #g2==0 then return end
......
...@@ -9,6 +9,7 @@ function s.initial_effect(c) ...@@ -9,6 +9,7 @@ function s.initial_effect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCode(EVENT_FREE_CHAIN) e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e1:SetCountLimit(1,id+EFFECT_COUNT_CODE_OATH) e1:SetCountLimit(1,id+EFFECT_COUNT_CODE_OATH)
e1:SetTarget(s.target) e1:SetTarget(s.target)
e1:SetOperation(s.activate) e1:SetOperation(s.activate)
......
...@@ -37,8 +37,7 @@ function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) ...@@ -37,8 +37,7 @@ function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then return Duel.IsExistingTarget(s.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil,tp) end if chk==0 then return Duel.IsExistingTarget(s.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
Duel.SelectTarget(tp,s.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil,tp) Duel.SelectTarget(tp,s.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil,tp)
local g=Duel.GetMatchingGroup(s.rmfilter,tp,LOCATION_HAND+LOCATION_MZONE+LOCATION_GRAVE,LOCATION_MZONE,nil) Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,PLAYER_ALL,LOCATION_HAND+LOCATION_MZONE+LOCATION_GRAVE)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,1,0,0)
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 c=e:GetHandler() local c=e:GetHandler()
...@@ -55,6 +54,8 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -55,6 +54,8 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp)
e1:SetValue(1500) e1:SetValue(1500)
e1:SetReset(RESET_EVENT+RESETS_STANDARD) e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1) tc:RegisterEffect(e1)
elseif #sg==0 and tc:IsRelateToEffect(e) and s.rmfilter(tc) then
Duel.Remove(tc,POS_FACEUP,REASON_EFFECT)
end end
end end
function s.cfilter(c) function s.cfilter(c)
......
...@@ -50,6 +50,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -50,6 +50,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp)
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP_DEFENSE) Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP_DEFENSE)
end end
end end
if not e:IsHasType(EFFECT_TYPE_ACTIVATE) then return end
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD) e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
......
...@@ -18,6 +18,7 @@ function c101111062.initial_effect(c) ...@@ -18,6 +18,7 @@ function c101111062.initial_effect(c)
e2:SetTarget(c101111062.sptg) e2:SetTarget(c101111062.sptg)
e2:SetOperation(c101111062.spop) e2:SetOperation(c101111062.spop)
c:RegisterEffect(e2) c:RegisterEffect(e2)
--control
local e3=Effect.CreateEffect(c) local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(101111062,1)) e3:SetDescription(aux.Stringid(101111062,1))
e3:SetCategory(CATEGORY_CONTROL) e3:SetCategory(CATEGORY_CONTROL)
......
...@@ -38,6 +38,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -38,6 +38,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp)
Duel.SendtoHand(sg1,nil,REASON_EFFECT) Duel.SendtoHand(sg1,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,sg1) Duel.ConfirmCards(1-tp,sg1)
end end
if not e:IsHasType(EFFECT_TYPE_ACTIVATE) then return end
local e1=Effect.CreateEffect(e:GetHandler()) local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD) e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
......
...@@ -4,7 +4,7 @@ function c101111064.initial_effect(c) ...@@ -4,7 +4,7 @@ function c101111064.initial_effect(c)
--spsummon --spsummon
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(101111064,0)) e1:SetDescription(aux.Stringid(101111064,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TODECK) e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_DESTROY)
e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN) e1:SetCode(EVENT_FREE_CHAIN)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
......
...@@ -56,9 +56,6 @@ function s.filter(c,e,tp) ...@@ -56,9 +56,6 @@ function s.filter(c,e,tp)
return c:IsSetCard(0x2b) and c:IsCanBeEffectTarget(e) return c:IsSetCard(0x2b) and c:IsCanBeEffectTarget(e)
and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEDOWN_DEFENSE) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEDOWN_DEFENSE)
end end
function s.spchk(g)
return aux.dncheck(g)
end
function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and s.filter(chkc,e,tp) end if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and s.filter(chkc,e,tp) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
...@@ -66,7 +63,7 @@ function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) ...@@ -66,7 +63,7 @@ function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
if Duel.IsPlayerAffectedByEffect(tp,59822133) then ft=1 end if Duel.IsPlayerAffectedByEffect(tp,59822133) then ft=1 end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.GetMatchingGroup(s.filter,tp,LOCATION_GRAVE,0,nil,e,tp):SelectSubGroup(tp,s.spchk,false,1,ft) local g=Duel.GetMatchingGroup(s.filter,tp,LOCATION_GRAVE,0,nil,e,tp):SelectSubGroup(tp,aux.dncheck,false,1,ft)
Duel.SetTargetCard(g) Duel.SetTargetCard(g)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,#g,0,0) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,#g,0,0)
end end
......
...@@ -18,18 +18,24 @@ end ...@@ -18,18 +18,24 @@ end
function s.condition(e,tp,eg,ep,ev,re,r,rp) function s.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetCustomActivityCount(id,1-tp,ACTIVITY_CHAIN)~=0 return Duel.GetCustomActivityCount(id,1-tp,ACTIVITY_CHAIN)~=0
end end
function s.filter(c,tp) function s.filter(c,b1,b2)
return (c:GetType()==TYPE_SPELL or c:GetType()==TYPE_TRAP) and not c:IsCode(id) return (c:GetType()==TYPE_SPELL or c:GetType()==TYPE_TRAP) and not c:IsCode(id)
and (Duel.GetFieldGroupCount(tp,0,LOCATION_MZONE)>0 and c:IsAbleToHand() or c:IsSSetable()) and (b1 and c:IsSSetable() or b2 and c:IsAbleToHand())
end end
function s.target(e,tp,eg,ep,ev,re,r,rp,chk) function s.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_DECK,0,1,nil,tp) end local ct=Duel.GetLocationCount(tp,LOCATION_SZONE)
if e:IsHasType(EFFECT_TYPE_ACTIVATE) and not e:GetHandler():IsLocation(LOCATION_SZONE) then ct=ct-1 end
local b1=ct>0
local b2=Duel.GetFieldGroupCount(tp,0,LOCATION_MZONE)>0
if chk==0 then return Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_DECK,0,1,nil,b1,b2) end
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 th=Duel.GetFieldGroupCount(tp,0,LOCATION_MZONE)>0
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_OPERATECARD) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_OPERATECARD)
local tc=Duel.SelectMatchingCard(tp,s.filter,tp,LOCATION_DECK,0,1,1,nil,tp):GetFirst() local tc=Duel.SelectMatchingCard(tp,s.filter,tp,LOCATION_DECK,0,1,1,nil,true,th):GetFirst()
if not tc then return end if not tc then return end
local b1,b2=tc:IsSSetable(),Duel.GetFieldGroupCount(tp,0,LOCATION_MZONE)>0 and tc:IsAbleToHand() local b1=tc:IsSSetable()
local b2=th and tc:IsAbleToHand()
if b1 and (not b2 or Duel.SelectOption(tp,1153,1190)==0) then if b1 and (not b2 or Duel.SelectOption(tp,1153,1190)==0) then
Duel.SSet(tp,tc) Duel.SSet(tp,tc)
local e1=Effect.CreateEffect(e:GetHandler()) local e1=Effect.CreateEffect(e:GetHandler())
......
...@@ -17,6 +17,7 @@ function c101111071.initial_effect(c) ...@@ -17,6 +17,7 @@ function c101111071.initial_effect(c)
e2:SetCode(EVENT_DESTROYED) e2:SetCode(EVENT_DESTROYED)
e2:SetProperty(EFFECT_FLAG_DELAY) e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCondition(c101111071.etcon) e2:SetCondition(c101111071.etcon)
e2:SetTarget(c101111071.ettg)
e2:SetOperation(c101111071.etop) e2:SetOperation(c101111071.etop)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
...@@ -39,14 +40,16 @@ function c101111071.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -39,14 +40,16 @@ function c101111071.activate(e,tp,eg,ep,ev,re,r,rp)
end end
end end
end end
function c101111071.cfilter(c)
return (c:IsCode(93717133) or (c:IsType(TYPE_XYZ) and c:GetOverlayGroup():IsExists(Card.IsCode,1,nil,93717133))) and c:IsFaceup()
end
function c101111071.etcon(e,tp,eg,ep,ev,re,r,rp) function c101111071.etcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
return Duel.GetTurnPlayer()~=tp and c:IsPreviousControler(tp) and c:IsReason(REASON_EFFECT) return Duel.GetTurnPlayer()~=tp and c:IsPreviousControler(tp) and c:IsReason(REASON_EFFECT)
and c:GetReasonPlayer()==1-tp and c:IsPreviousLocation(LOCATION_ONFIELD) and c:IsPreviousPosition(POS_FACEDOWN) and c:GetReasonPlayer()==1-tp and c:IsPreviousLocation(LOCATION_ONFIELD) and c:IsPreviousPosition(POS_FACEDOWN)
and Duel.IsExistingMatchingCard(c101111071.cfilter,tp,LOCATION_MZONE,0,1,nil) end
function c101111071.cfilter(c)
return c:IsFaceup() and (c:IsCode(93717133) or (c:IsType(TYPE_XYZ) and c:GetOverlayGroup():IsExists(Card.IsCode,1,nil,93717133)))
end
function c101111071.ettg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c101111071.cfilter,tp,LOCATION_ONFIELD,0,1,nil) end
end end
function c101111071.etop(e,tp,eg,ep,ev,re,r,rp) function c101111071.etop(e,tp,eg,ep,ev,re,r,rp)
Duel.SkipPhase(1-tp,PHASE_DRAW,RESET_PHASE+PHASE_END,1) Duel.SkipPhase(1-tp,PHASE_DRAW,RESET_PHASE+PHASE_END,1)
......
...@@ -6,17 +6,18 @@ function s.initial_effect(c) ...@@ -6,17 +6,18 @@ function s.initial_effect(c)
--Activate --Activate
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_REMOVE+CATEGORY_SPECIAL_SUMMON) e1:SetCategory(CATEGORY_REMOVE+CATEGORY_SPECIAL_SUMMON+CATEGORY_DECKDES)
e1:SetType(EFFECT_TYPE_ACTIVATE) 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)
e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e1:SetTarget(s.target) e1:SetTarget(s.target)
e1:SetOperation(s.activate) e1:SetOperation(s.activate)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
function s.filter(c) function s.filter(c)
return (c:IsType(TYPE_MONSTER) or c:IsLocation(LOCATION_MZONE)) and c:IsAbleToRemove() return c:IsType(TYPE_MONSTER) and c:IsAbleToRemove()
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:IsLocation(0x14) and s.filter(chkc) end if chkc then return chkc:IsLocation(0x14) and s.filter(chkc) end
...@@ -25,7 +26,6 @@ function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) ...@@ -25,7 +26,6 @@ function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectTarget(tp,s.filter,tp,0x14,0x14,ct,ct,nil) local g=Duel.SelectTarget(tp,s.filter,tp,0x14,0x14,ct,ct,nil)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,ct,0,0) Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,ct,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,0,1-tp,LOCATION_DECK)
end end
function s.sfilter(c,e,tp) function s.sfilter(c,e,tp)
return c:IsCanBeSpecialSummoned(e,0,tp,false,false) return c:IsCanBeSpecialSummoned(e,0,tp,false,false)
......
...@@ -43,9 +43,9 @@ function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) ...@@ -43,9 +43,9 @@ function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectTarget(tp,s.cfilter,tp,LOCATION_GRAVE,LOCATION_GRAVE,1,1,nil) local g=Duel.SelectTarget(tp,s.cfilter,tp,LOCATION_GRAVE,LOCATION_GRAVE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,1,0,0) Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_DISABLE,eg,1,0,0)
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 c=e:GetHandler()
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) if tc:IsRelateToEffect(e)
and Duel.Remove(tc,POS_FACEUP,REASON_EFFECT)>0 then and Duel.Remove(tc,POS_FACEUP,REASON_EFFECT)>0 then
......
...@@ -62,15 +62,13 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -62,15 +62,13 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp)
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_DISABLE) e1:SetCode(EFFECT_DISABLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e1:SetReset(RESET_EVENT+RESETS_STANDARD)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e1) tc:RegisterEffect(e1)
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE) e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_DISABLE_EFFECT) e2:SetCode(EFFECT_DISABLE_EFFECT)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e2:SetValue(RESET_TURN_SET) e2:SetValue(RESET_TURN_SET)
e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) e2:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e2) tc:RegisterEffect(e2)
if lc:IsRelateToEffect(e) and lc:IsControler(tp) if lc:IsRelateToEffect(e) and lc:IsControler(tp)
and lc:IsFaceup() then and lc:IsFaceup() then
......
...@@ -17,7 +17,7 @@ function s.initial_effect(c) ...@@ -17,7 +17,7 @@ function s.initial_effect(c)
--xyzmat to hand --xyzmat to hand
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(id,1)) e2:SetDescription(aux.Stringid(id,1))
e2:SetCategory(CATEGORY_TOHAND) e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_REMOVE) e2:SetCode(EVENT_REMOVE)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY) e2:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY)
...@@ -29,24 +29,27 @@ end ...@@ -29,24 +29,27 @@ end
function s.cfilter(c) function s.cfilter(c)
return c:IsFaceup() and c:IsSetCard(0x189) and c:IsType(TYPE_XYZ) return c:IsFaceup() and c:IsSetCard(0x189) and c:IsType(TYPE_XYZ)
end end
function s.condition(e) function s.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(s.cfilter,0,LOCATION_MZONE,LOCATION_MZONE,1,nil) return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil)
end end
function s.target(e,tp,eg,ep,ev,re,r,rp,chk) function s.target(e,tp,eg,ep,ev,re,r,rp,chk)
local g1=Duel.GetFieldGroup(tp,LOCATION_MZONE,0) local g1=Duel.GetFieldGroup(tp,LOCATION_MZONE,0)
local g2=Duel.GetFieldGroup(tp,0,LOCATION_MZONE) local g2=Duel.GetFieldGroup(tp,0,LOCATION_MZONE)
local b1=#g1>1 and g1:IsExists(Card.IsAbleToRemove,1,nil,tp,POS_FACEDOWN,REASON_RULE) local b1=#g1>1 and Duel.IsPlayerCanRemove(tp)
local b2=#g2>1 and g2:IsExists(Card.IsAbleToRemove,1,nil,1-tp,POS_FACEDOWN,REASON_RULE) and g1:IsExists(Card.IsAbleToRemove,1,nil,tp,POS_FACEDOWN,REASON_RULE)
if chk==0 then return Duel.IsPlayerCanRemove(tp) and (b1 or b2) end local b2=#g2>1 and Duel.IsPlayerCanRemove(1-tp)
and g2:IsExists(Card.IsAbleToRemove,1,nil,1-tp,POS_FACEDOWN,REASON_RULE)
if chk==0 then return b1 or b2 end
local g3=g1+g2 local g3=g1+g2
Duel.SetOperationInfo(0,CATEGORY_REMOVE,g3,1,0,0) Duel.SetOperationInfo(0,CATEGORY_REMOVE,g3,1,0,0)
end end
function s.activate(e,tp,eg,ep,ev,re,r,rp) function s.activate(e,tp,eg,ep,ev,re,r,rp)
if not Duel.IsPlayerCanRemove(tp) then return end
local g1=Duel.GetFieldGroup(tp,LOCATION_MZONE,0) local g1=Duel.GetFieldGroup(tp,LOCATION_MZONE,0)
local g2=Duel.GetFieldGroup(tp,0,LOCATION_MZONE) local g2=Duel.GetFieldGroup(tp,0,LOCATION_MZONE)
local b1=#g1>1 and g1:IsExists(Card.IsAbleToRemove,1,nil,tp,POS_FACEDOWN,REASON_RULE) local b1=#g1>1 and Duel.IsPlayerCanRemove(tp)
local b2=#g2>1 and g2:IsExists(Card.IsAbleToRemove,1,nil,1-tp,POS_FACEDOWN,REASON_RULE) and g1:IsExists(Card.IsAbleToRemove,1,nil,tp,POS_FACEDOWN,REASON_RULE)
local b2=#g2>1 and Duel.IsPlayerCanRemove(1-tp)
and g2:IsExists(Card.IsAbleToRemove,1,nil,1-tp,POS_FACEDOWN,REASON_RULE)
if b1 then if b1 then
local ct=#g1-1 local ct=#g1-1
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
...@@ -88,6 +91,7 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) ...@@ -88,6 +91,7 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)>0 if Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and bc:IsCanBeSpecialSummoned(e,0,tp,false,false) and bc:IsCanBeSpecialSummoned(e,0,tp,false,false)
and Duel.SelectYesNo(tp,aux.Stringid(id,2)) then and Duel.SelectYesNo(tp,aux.Stringid(id,2)) then
Duel.BreakEffect()
Duel.SpecialSummon(bc,0,tp,tp,false,false,POS_FACEUP) Duel.SpecialSummon(bc,0,tp,tp,false,false,POS_FACEUP)
end end
end end
......
...@@ -50,6 +50,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) ...@@ -50,6 +50,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp,lv) local sg=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp,lv)
if #sg>0 then if #sg>0 then
Duel.BreakEffect()
Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP) Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP)
end end
end end
......
...@@ -20,6 +20,7 @@ function s.initial_effect(c) ...@@ -20,6 +20,7 @@ function s.initial_effect(c)
e2:SetRange(LOCATION_GRAVE) e2:SetRange(LOCATION_GRAVE)
e2:SetCode(EVENT_FREE_CHAIN) e2:SetCode(EVENT_FREE_CHAIN)
e2:SetCountLimit(1,id) e2:SetCountLimit(1,id)
e2:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e2:SetCost(aux.bfgcost) e2:SetCost(aux.bfgcost)
e2:SetTarget(s.thtg) e2:SetTarget(s.thtg)
e2:SetOperation(s.thop) e2:SetOperation(s.thop)
...@@ -41,12 +42,10 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -41,12 +42,10 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local tc=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.spfilter),tp,LOCATION_HAND+LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil,e,tp):GetFirst() local tc=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.spfilter),tp,LOCATION_HAND+LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil,e,tp):GetFirst()
if tc and Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)>0 then if tc and Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)>0 then
Duel.BreakEffect()
local tg=Duel.GetMatchingGroup(Card.IsAbleToHand,tp,LOCATION_MZONE,0,nil)
tg:AddCard(tc)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND)
local rg=tg:FilterSelect(tp,Card.IsAbleToHand,1,1,nil) local rg=Duel.SelectMatchingCard(tp,Card.IsAbleToHand,tp,LOCATION_MZONE,0,1,1,nil)
Duel.HintSelection(rg) Duel.HintSelection(rg)
Duel.BreakEffect()
res=Duel.SendtoHand(rg,nil,REASON_EFFECT) res=Duel.SendtoHand(rg,nil,REASON_EFFECT)
end end
end end
......
...@@ -6,7 +6,7 @@ function c101111078.initial_effect(c) ...@@ -6,7 +6,7 @@ function c101111078.initial_effect(c)
e1:SetCategory(CATEGORY_TOGRAVE) e1:SetCategory(CATEGORY_TOGRAVE)
e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN) e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(0,TIMING_BATTLE_START) e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e1:SetCondition(c101111078.condition) e1:SetCondition(c101111078.condition)
e1:SetTarget(c101111078.target) e1:SetTarget(c101111078.target)
e1:SetOperation(c101111078.operation) e1:SetOperation(c101111078.operation)
...@@ -15,9 +15,6 @@ end ...@@ -15,9 +15,6 @@ end
function c101111078.condition(e,tp,eg,ep,ev,re,r,rp) function c101111078.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetFieldGroupCount(tp,0,LOCATION_MZONE)-Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0)>=2 return Duel.GetFieldGroupCount(tp,0,LOCATION_MZONE)-Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0)>=2
end end
function c101111078.tgfilter(c)
return c:IsType(TYPE_MONSTER)
end
function c101111078.target(e,tp,eg,ep,ev,re,r,rp,chk) function c101111078.target(e,tp,eg,ep,ev,re,r,rp,chk)
local mc=Duel.GetFieldGroupCount(tp,0,LOCATION_MZONE) local mc=Duel.GetFieldGroupCount(tp,0,LOCATION_MZONE)
local count=mc-1 local count=mc-1
......
...@@ -7,7 +7,7 @@ function c101111079.initial_effect(c) ...@@ -7,7 +7,7 @@ function c101111079.initial_effect(c)
e1:SetCategory(CATEGORY_TOHAND) e1:SetCategory(CATEGORY_TOHAND)
e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN) e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(0,TIMING_END_PHASE) e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e1:SetCondition(c101111079.condtion) e1:SetCondition(c101111079.condtion)
e1:SetTarget(c101111079.target) e1:SetTarget(c101111079.target)
e1:SetOperation(c101111079.operation) e1:SetOperation(c101111079.operation)
......
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