Commit 8576ae7f authored by mercury233's avatar mercury233

fix

parent 015f897c
Pipeline #12073 passed with stages
in 28 seconds
......@@ -9,7 +9,7 @@ function c100290040.initial_effect(c)
e1:SetCountLimit(1,100290040)
e1:SetCost(c100290040.lvcost)
e1:SetOperation(c100290040.lvop)
c:RegisterEffect(e1)
c:RegisterEffect(e1)
--special summon
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(100290040,1))
......
......@@ -10,7 +10,7 @@ function c100290046.initial_effect(c)
e1:SetCountLimit(1,100290046+EFFECT_COUNT_CODE_OATH)
e1:SetTarget(c100290046.target)
e1:SetOperation(c100290046.activate)
c:RegisterEffect(e1)
c:RegisterEffect(e1)
--destroy replace
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
......
......@@ -47,6 +47,7 @@ function c100427005.eqop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(aux.NecroValleyFilter(c100427005.eqfilter),tp,LOCATION_DECK+LOCATION_GRAVE,0,nil,c,tp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
local sg=g:SelectSubGroup(tp,aux.dncheck,false,1,math.min(ft,3))
if not sg then return end
local tc=sg:GetFirst()
while tc do
Duel.Equip(tp,tc,c,true,true)
......
......@@ -37,7 +37,7 @@ function c100427030.initial_effect(c)
c:RegisterEffect(e3)
--pendulem
local e4=Effect.CreateEffect(c)
e4:SetCategory(CATEGORY_LEAVE_GRAVE)
e4:SetCategory(CATEGORY_LEAVE_GRAVE)
e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e4:SetCode(EVENT_SPSUMMON_SUCCESS)
e4:SetRange(LOCATION_GRAVE)
......
......@@ -37,7 +37,7 @@ function c100427031.initial_effect(c)
c:RegisterEffect(e3)
--pendulem
local e4=Effect.CreateEffect(c)
e4:SetCategory(CATEGORY_LEAVE_GRAVE)
e4:SetCategory(CATEGORY_LEAVE_GRAVE)
e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e4:SetCode(EVENT_SPSUMMON_SUCCESS)
e4:SetRange(LOCATION_GRAVE)
......
......@@ -8,7 +8,7 @@ function c100427033.initial_effect(c)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_HAND+LOCATION_GRAVE)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCountLimit(1,100427033)
e1:SetCountLimit(1,100427033)
e1:SetTarget(c100427033.sptg)
e1:SetOperation(c100427033.spop)
c:RegisterEffect(e1)
......
......@@ -28,7 +28,7 @@ function s.initial_effect(c)
--Special Summon (from hand : Elemental HERO)
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(id,2))
e3:SetCategory(CATEGORY_SPECIAL_SUMMON)
e3:SetCategory(CATEGORY_TODECK+CATEGORY_SPECIAL_SUMMON)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetCountLimit(1,id+o*2)
e3:SetRange(LOCATION_MZONE)
......@@ -76,8 +76,10 @@ function s.spfilter2(c,e,tp)
return c:IsSetCard(0x3008) and c:IsType(TYPE_NORMAL) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function s.sptg2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToDeck() and Duel.GetMZoneCount(tp,e:GetHandler())>0
local c=e:GetHandler()
if chk==0 then return c:IsAbleToDeck() and Duel.GetMZoneCount(tp,c)>0
and Duel.IsExistingMatchingCard(s.spfilter2,tp,LOCATION_DECK,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_TODECK,c,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
end
function s.spop2(e,tp,eg,ep,ev,re,r,rp)
......
......@@ -16,7 +16,7 @@ function s.initial_effect(c)
--Draw & Return to Deck
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(id,1))
e2:SetCategory(CATEGORY_TOHAND)
e2:SetCategory(CATEGORY_DRAW+CATEGORY_TODECK)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
......@@ -56,6 +56,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_DISABLE_EFFECT)
e2:SetReset(RESET_EVENT+RESETS_STANDARD)
e2:SetValue(RESET_TURN_SET)
tc:RegisterEffect(e2)
end
Duel.SpecialSummonComplete()
......@@ -71,6 +72,7 @@ function s.drtg(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SetTargetPlayer(tp)
Duel.SetTargetParam(2)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,2)
Duel.SetOperationInfo(0,CATEGORY_TODECK,nil,1,tp,LOCATION_HAND)
end
function s.drop(e,tp,eg,ep,ev,re,r,rp)
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
......
......@@ -39,7 +39,7 @@ function c101109005.atkcon(e,tp,eg,ep,ev,re,r,rp)
end
function c101109005.atkcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToGraveAsCost() end
Duel.SendtoGrave(e:GetHandler(),REASON_EFFECT)
Duel.SendtoGrave(e:GetHandler(),REASON_COST)
end
function c101109005.atkop(e,tp,eg,ep,ev,re,r,rp)
local a,d=Duel.GetBattleMonster(tp)
......
......@@ -48,7 +48,7 @@ function c101109006.discost(e,tp,eg,ep,ev,re,r,rp,chk)
e:SetLabelObject(tc)
end
function c101109006.distg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
if chk==0 then return not re:GetHandler():IsDisabled() end
Duel.SetOperationInfo(0,CATEGORY_DISABLE,eg,1,0,0)
end
function c101109006.disop(e,tp,eg,ep,ev,re,r,rp)
......
......@@ -48,7 +48,7 @@ function c101109007.discost(e,tp,eg,ep,ev,re,r,rp,chk)
e:SetLabelObject(tc)
end
function c101109007.distg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
if chk==0 then return not re:GetHandler():IsDisabled() end
Duel.SetOperationInfo(0,CATEGORY_DISABLE,eg,1,0,0)
end
function c101109007.disop(e,tp,eg,ep,ev,re,r,rp)
......
......@@ -84,9 +84,9 @@ function c101109008.sptg2(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_SZONE) and chkc:IsControler(tp) and c101109008.spfilter(chkc,e,tp) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingTarget(c101109008.spfilter,tp,LOCATION_SZONE,0,1,nil,e,tp) end
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,c101109008.spfilter,tp,LOCATION_SZONE,0,1,1,nil,e,tp)
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0)
end
function c101109008.spop2(e,tp,eg,ep,ev,re,r,rp)
......
......@@ -65,7 +65,7 @@ function c101109009.spop1(e,tp,eg,ep,ev,re,r,rp)
if g:GetCount()>0 then
local tc=g:GetFirst()
while tc do
Duel.Equip(tp,tc,c,false)
Duel.Equip(tp,tc,c,true,true)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_OWNER_RELATE)
......@@ -75,6 +75,7 @@ function c101109009.spop1(e,tp,eg,ep,ev,re,r,rp)
tc:RegisterEffect(e1)
tc=g:GetNext()
end
Duel.EquipComplete()
end
end
end
......@@ -110,6 +111,7 @@ function c101109009.spop2(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=c:GetEquipTarget()
if c:IsRelateToEffect(e) and Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP) and tc then
Duel.BreakEffect()
Duel.Equip(tp,tc,c,false)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
......
......@@ -15,17 +15,17 @@ function c101109013.initial_effect(c)
e1:SetOperation(c101109013.tgop)
c:RegisterEffect(e1)
--fusion
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(101109013,1))
e3:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_FUSION_SUMMON+CATEGORY_GRAVE_ACTION)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_TO_GRAVE)
e3:SetCountLimit(1,101109013+100)
e3:SetProperty(EFFECT_FLAG_DELAY)
e3:SetCondition(c101109013.condition)
e3:SetTarget(c101109013.target)
e3:SetOperation(c101109013.activate)
c:RegisterEffect(e3)
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(101109013,1))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_FUSION_SUMMON+CATEGORY_GRAVE_ACTION)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_TO_GRAVE)
e2:SetCountLimit(1,101109013+100)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCondition(c101109013.condition)
e2:SetTarget(c101109013.target)
e2:SetOperation(c101109013.activate)
c:RegisterEffect(e2)
end
function c101109013.tgcon(e,tp,eg,ep,ev,re,r,rp)
return rp==1-tp and re:IsActiveType(TYPE_MONSTER) and re:GetActivateLocation()==LOCATION_MZONE
......
......@@ -13,17 +13,17 @@ function c101109014.initial_effect(c)
e1:SetOperation(c101109014.tgop)
c:RegisterEffect(e1)
--fusion
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(101109014,1))
e3:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_FUSION_SUMMON+CATEGORY_GRAVE_ACTION)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_TO_GRAVE)
e3:SetCountLimit(1,101109014+100)
e3:SetProperty(EFFECT_FLAG_DELAY)
e3:SetCondition(c101109014.condition)
e3:SetTarget(c101109014.target)
e3:SetOperation(c101109014.activate)
c:RegisterEffect(e3)
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(101109014,1))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_FUSION_SUMMON+CATEGORY_GRAVE_ACTION)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_TO_GRAVE)
e2:SetCountLimit(1,101109014+100)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCondition(c101109014.condition)
e2:SetTarget(c101109014.target)
e2:SetOperation(c101109014.activate)
c:RegisterEffect(e2)
end
function c101109014.tgfilter(c)
return c:IsType(TYPE_MONSTER) and c:IsAbleToGrave()
......
......@@ -52,7 +52,7 @@ function c101109021.cpcost(e,tp,eg,ep,ev,re,r,rp,chk)
end
function c101109021.cpop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
if not (c:IsFaceup() and c:IsRelateToEffect(e)) then return end
local tc=e:GetLabelObject()
local code=tc:GetOriginalCodeRule()
local e1=Effect.CreateEffect(c)
......
......@@ -60,6 +60,7 @@ function c101109026.spop(e,tp,eg,ep,ev,re,r,rp)
sc:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EFFECT_DISABLE_EFFECT)
e2:SetValue(RESET_TURN_SET)
sc:RegisterEffect(e2)
Duel.RaiseEvent(e:GetHandler(),EVENT_ADJUST,nil,0,PLAYER_NONE,PLAYER_NONE,0)
local g=Group.FromCards(c,sc)
......
......@@ -40,7 +40,7 @@ function c101109027.spop(e,tp,eg,ep,ev,re,r,rp)
e1:SetAbsoluteRange(tp,1,0)
e1:SetTarget(c101109027.splimit)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
c:RegisterEffect(e1,true)
c:RegisterEffect(e1,true)
end
end
function c101109027.splimit(e,c)
......@@ -64,7 +64,7 @@ function c101109027.discost(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.Release(g,REASON_COST)
end
function c101109027.distg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
if chk==0 then return not re:GetHandler():IsDisabled() end
Duel.SetOperationInfo(0,CATEGORY_DISABLE,eg,1,0,0)
end
function c101109027.disop(e,tp,eg,ep,ev,re,r,rp)
......
......@@ -63,7 +63,7 @@ function s.gcheck(lv)
return aux.dncheck(sg) and sg:GetSum(Card.GetLevel)<=lv
end
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)
if chk==0 then
local c=e:GetHandler()
local clv=c:GetLevel()
......
--倶利伽羅天童
--Scripted by mallu11
function c101109031.initial_effect(c)
local s,id,o=GetID()
function s.initial_effect(c)
c:EnableReviveLimit()
--special summon condition
local e1=Effect.CreateEffect(c)
......@@ -15,50 +15,50 @@ function c101109031.initial_effect(c)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e2:SetCode(EFFECT_SPSUMMON_PROC)
e2:SetRange(LOCATION_HAND)
e2:SetCondition(c101109031.sprcon)
e2:SetOperation(c101109031.sprop)
e2:SetCondition(s.sprcon)
e2:SetOperation(s.sprop)
c:RegisterEffect(e2)
--special summon
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(101109031,0))
e3:SetDescription(aux.Stringid(id,0))
e3:SetCategory(CATEGORY_SPECIAL_SUMMON)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_PHASE+PHASE_END)
e3:SetProperty(EFFECT_FLAG_CARD_TARGET)
e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1,101109031)
e3:SetCondition(c101109031.spcon)
e3:SetTarget(c101109031.sptg)
e3:SetOperation(c101109031.spop)
e3:SetCountLimit(1,id)
e3:SetCondition(s.spcon)
e3:SetTarget(s.sptg)
e3:SetOperation(s.spop)
c:RegisterEffect(e3)
if not c101109031.global_check then
c101109031.global_check=true
if not s.global_check then
s.global_check=true
local ge1=Effect.CreateEffect(c)
ge1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
ge1:SetCode(EVENT_CHAIN_SOLVED)
ge1:SetOperation(c101109031.checkop)
ge1:SetOperation(s.checkop)
Duel.RegisterEffect(ge1,0)
end
end
function c101109031.checkop(e,tp,eg,ep,ev,re,r,rp)
function s.checkop(e,tp,eg,ep,ev,re,r,rp)
local rc=re:GetHandler()
if not rc:IsRelateToEffect(re) or not re:IsActiveType(TYPE_MONSTER) then return end
local p,loc=Duel.GetChainInfo(ev,CHAININFO_TRIGGERING_CONTROLER,CHAININFO_TRIGGERING_LOCATION)
if loc==LOCATION_MZONE and rc:GetFlagEffect(101109032-p)==0 then
rc:RegisterFlagEffect(101109032-p,RESET_EVENT+RESETS_STANDARD-RESET_TURN_SET+RESET_PHASE+PHASE_END,0,1)
if loc==LOCATION_MZONE and rc:GetFlagEffect(id+o+p)==0 then
rc:RegisterFlagEffect(id+o+p,RESET_EVENT+RESETS_STANDARD-RESET_TURN_SET+RESET_PHASE+PHASE_END,0,1)
end
end
function c101109031.rfilter(c,tp)
return c:IsFaceup() and c:GetFlagEffect(101109031+tp)>0
function s.rfilter(c,p)
return c:IsFaceup() and c:GetFlagEffect(id+o+p)>0
end
function c101109031.sprcon(e,c)
function s.sprcon(e,c)
if c==nil then return true end
local tp=c:GetControler()
local rg=Duel.GetMatchingGroup(c101109031.rfilter,tp,LOCATION_MZONE,LOCATION_MZONE,nil,tp)
local rg=Duel.GetMatchingGroup(s.rfilter,tp,LOCATION_MZONE,LOCATION_MZONE,nil,1-tp)
return rg:GetCount()>0 and rg:FilterCount(Card.IsReleasable,nil)==rg:GetCount() and aux.mzctcheck(rg,tp)
end
function c101109031.sprop(e,tp,eg,ep,ev,re,r,rp,c)
local rg=Duel.GetMatchingGroup(c101109031.rfilter,tp,LOCATION_MZONE,LOCATION_MZONE,nil,tp)
function s.sprop(e,tp,eg,ep,ev,re,r,rp,c)
local rg=Duel.GetMatchingGroup(s.rfilter,tp,LOCATION_MZONE,LOCATION_MZONE,nil,1-tp)
Duel.Release(rg,REASON_COST)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
......@@ -67,21 +67,21 @@ function c101109031.sprop(e,tp,eg,ep,ev,re,r,rp,c)
e1:SetReset(RESET_EVENT+RESETS_STANDARD-RESET_TOFIELD+RESET_DISABLE)
c:RegisterEffect(e1)
end
function c101109031.spcon(e,tp,eg,ep,ev,re,r,rp)
function s.spcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()==tp
end
function c101109031.spfilter(c,e,tp)
function s.spfilter(c,e,tp)
return c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c101109031.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(1-tp) and c101109031.spfilter(chkc,e,tp) end
function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(1-tp) and s.spfilter(chkc,e,tp) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingTarget(c101109031.spfilter,tp,0,LOCATION_GRAVE,1,nil,e,tp) end
and Duel.IsExistingTarget(s.spfilter,tp,0,LOCATION_GRAVE,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,c101109031.spfilter,tp,0,LOCATION_GRAVE,1,1,nil,e,tp)
local g=Duel.SelectTarget(tp,s.spfilter,tp,0,LOCATION_GRAVE,1,1,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0)
end
function c101109031.spop(e,tp,eg,ep,ev,re,r,rp)
function s.spop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)
......
......@@ -17,7 +17,6 @@ function c101109032.initial_effect(c)
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_BATTLE_DESTROYED)
e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP)
e2:SetRange(LOCATION_HAND)
e2:SetCountLimit(1,101109032+100)
e2:SetCondition(c101109032.spcon)
......@@ -63,7 +62,7 @@ function c101109032.srop(e,tp,eg,ep,ev,re,r,rp)
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
local e1=Effect.CreateEffect(e:GetHandler())
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCode(EFFECT_CANNOT_ACTIVATE)
......@@ -80,7 +79,7 @@ function c101109032.cfilter(c,tp)
and bit.band(c:GetPreviousAttributeOnField(),ATTRIBUTE_EARTH)~=0
end
function c101109032.spcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c101109032.cfilter,1,nil,tp) and not eg:IsContains(e:GetHandler())
return eg:IsExists(c101109032.cfilter,1,nil,tp)
end
function c101109032.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
......
......@@ -17,10 +17,11 @@ function c101109033.initial_effect(c)
c:RegisterEffect(e2)
end
function c101109033.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsOnField() end
if chk==0 then return Duel.IsExistingTarget(aux.TRUE,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,e:GetHandler()) end
local c=e:GetHandler()
if chkc then return chkc:IsOnField() and chkc~=c end
if chk==0 then return Duel.IsExistingTarget(aux.TRUE,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,c) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectTarget(tp,aux.TRUE,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,2,e:GetHandler())
local g=Duel.SelectTarget(tp,aux.TRUE,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,2,c)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0)
end
function c101109033.desop(e,tp,eg,ep,ev,re,r,rp)
......
......@@ -50,9 +50,13 @@ function c101109039.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local sg=g:Select(tp,1,1,nil)
Duel.DisableShuffleCheck()
Duel.SendtoHand(sg,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,sg)
Duel.ShuffleHand(tp)
if sg:GetFirst():IsAbleToHand() then
Duel.SendtoHand(sg,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,sg)
Duel.ShuffleHand(tp)
else
Duel.SendtoGrave(sg,REASON_RULE)
end
Duel.SortDecktop(tp,tp,dg:GetCount()-1)
else Duel.SortDecktop(tp,tp,dg:GetCount()) end
end
......
......@@ -73,6 +73,7 @@ function c101109042.tgtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_GRAVE)
end
function c101109042.tgop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<1 then return end
local tc=Duel.GetFirstTarget()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(c101109042.spfilter),tp,LOCATION_HAND+LOCATION_GRAVE,0,1,1,nil,e,tp)
......
......@@ -19,7 +19,7 @@ function c101109045.initial_effect(c)
--to hand
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(101109045,1))
e2:SetCategory(CATEGORY_TOEXTRA+CATEGORY_SPECIAL_SUMMON+CATEGORY_DECKDES)
e2:SetCategory(CATEGORY_TOEXTRA+CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_SUMMON_SUCCESS)
e2:SetProperty(EFFECT_FLAG_DELAY)
......@@ -66,7 +66,7 @@ end
function c101109045.tdtg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return c:IsAbleToExtra() end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,c,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_TODECK,c,1,0,0)
end
function c101109045.spfilter(c,e,tp)
return c:IsSetCard(0x146) and c:IsType(TYPE_XYZ) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
......
......@@ -6,23 +6,23 @@ function c101109047.initial_effect(c)
c:EnableReviveLimit()
aux.AddXyzProcedureLevelFree(c,c101109047.mfilter,nil,2,2)
--atk
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetRange(LOCATION_MZONE)
e1:SetCode(EFFECT_SET_BASE_ATTACK)
e1:SetCondition(c101109047.adcon)
e1:SetValue(c101109047.atkval)
c:RegisterEffect(e1)
--spsummon
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_MZONE)
e2:SetCode(EFFECT_SET_BASE_ATTACK)
e2:SetCondition(c101109047.adcon)
e2:SetValue(c101109047.atkval)
e2:SetCountLimit(1,101109047)
e2:SetTarget(c101109047.sptg)
e2:SetOperation(c101109047.spop)
c:RegisterEffect(e2)
--spsummon
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_SPECIAL_SUMMON)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1,101109047)
e3:SetTarget(c101109047.sptg)
e3:SetOperation(c101109047.spop)
c:RegisterEffect(e3)
end
function c101109047.mfilter(c,xyzc)
return c:IsXyzLevel(xyzc,2) or c:IsLink(2)
......
......@@ -24,7 +24,7 @@ function s.cfilter(c,tc,tp)
end
function s.fstg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and s.tgfilter(chkc,tp) end
if chk==0 then return Duel.IsExistingMatchingCard(s.tgfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil,tp) end
if chk==0 then return Duel.IsExistingTarget(s.tgfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
Duel.SelectTarget(tp,s.tgfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil,tp)
end
......
......@@ -57,6 +57,7 @@ function c101109058.tgop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local tg=g:FilterSelect(tp,Card.IsAbleToGrave,1,1,nil)
Duel.SendtoGrave(tg,REASON_EFFECT)
if g==g2 then Duel.ShuffleExtra(1-tp) end
end
end
function c101109058.acfilter(c,tp,re,rp)
......@@ -69,7 +70,7 @@ function c101109058.tgfilter(c,eg)
return eg:IsContains(c)
end
function c101109058.atktg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) end
if chkc then return false end
if chk==0 then return Duel.IsExistingTarget(c101109058.tgfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil,eg) end
Duel.SetTargetCard(eg)
end
......
......@@ -8,8 +8,10 @@ function c101109059.initial_effect(c)
e1:SetCategory(CATEGORY_ATKCHANGE+CATEGORY_DEFCHANGE)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP)
e1:SetHintTiming(TIMING_DAMAGE_STEP)
e1:SetCountLimit(1,101109059+EFFECT_COUNT_CODE_OATH)
e1:SetCondition(aux.dscon)
e1:SetTarget(c101109059.atktg)
e1:SetOperation(c101109059.atkop)
c:RegisterEffect(e1)
......@@ -32,6 +34,7 @@ function c101109059.atktg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return false end
if chk==0 then return Duel.IsExistingTarget(c101109059.atkfilter,tp,LOCATION_MZONE,0,1,nil)
and Duel.IsExistingTarget(Card.IsFaceup,tp,0,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
local g1=Duel.SelectTarget(tp,c101109059.atkfilter,tp,LOCATION_MZONE,0,1,1,nil)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
......@@ -55,17 +58,18 @@ function c101109059.atkop(e,tp,eg,ep,ev,re,r,rp)
e2:SetCode(EFFECT_UPDATE_DEFENSE)
sc1:RegisterEffect(e2)
end
function c101109059.disfilter(c)
return (c:IsSetCard(0x17a) or c:IsCode(56099748)) and c:IsType(TYPE_MONSTER) and c:IsFaceup()
function c101109059.disfilter(c,tp)
return (c:IsSetCard(0x17a) or c:IsCode(56099748))
and c:IsLocation(LOCATION_MZONE) and c:IsFaceup() and c:IsControler(tp)
end
function c101109059.discon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not re:IsHasProperty(EFFECT_FLAG_CARD_TARGET) then return false end
local g=Duel.GetChainInfo(ev,CHAININFO_TARGET_CARDS)
return g and g:IsExists(c101109059.disfilter,1,nil) and Duel.IsChainDisablable(ev)
return g and g:IsExists(c101109059.disfilter,1,nil,tp) and Duel.IsChainDisablable(ev)
end
function c101109059.distg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
if chk==0 then return not re:GetHandler():IsDisabled() end
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
Duel.SetOperationInfo(0,CATEGORY_DISABLE,eg,1,0,0)
end
function c101109059.disop(e,tp,eg,ep,ev,re,r,rp)
......
......@@ -3,10 +3,10 @@
--Script by JoyJ
function c101109063.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e1)
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_ACTIVATE)
e0:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e0)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TODECK+CATEGORY_SEARCH)
......@@ -70,10 +70,11 @@ function c101109063.operation(e,tp,eg,ep,ev,re,r,rp)
local tc=e:GetLabelObject()
if not tc:IsRelateToEffect(e) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c101109063.cfilter2,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil,tc)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(c101109063.cfilter2),tp,LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil,tc)
if #g>0 and Duel.SendtoHand(g,nil,REASON_EFFECT)>0 then
Duel.ConfirmCards(1-tp,g)
Duel.SendtoDeck(tc,nil,1,REASON_EFFECT)
Duel.ShuffleDeck(tp)
Duel.SendtoDeck(tc,nil,SEQ_DECKBOTTOM,REASON_EFFECT)
end
end
function c101109063.atkcon(e,tp,eg,ep,ev,re,r,rp)
......
......@@ -40,7 +40,7 @@ function c101109075.activate(e,tp,eg,ep,ev,re,r,rp)
if g2:GetCount()<ct then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND)
local sg=g2:Select(tp,ct,ct,nil)
if Duel.SendtoHand(sg,nil,REASON_EFFECT)>0 then
if Duel.SendtoHand(sg,nil,REASON_EFFECT)>0 and sg:IsExists(Card.IsLocation,1,nil,LOCATION_HAND) then
Duel.SendtoHand(tg,nil,REASON_EFFECT)
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