Commit faf0e6e6 authored by mercury233's avatar mercury233

fix

parent d67265ed
......@@ -14,7 +14,7 @@ function c100200186.initial_effect(c)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetRange(LOCATION_GRAVE)
e2:SetCountLimit(1,15381422)
e2:SetCountLimit(1,100200186)
e2:SetCost(aux.bfgcost)
e2:SetTarget(c100200186.thtg)
e2:SetOperation(c100200186.thop)
......@@ -28,7 +28,7 @@ function c100200186.thfilter(c)
end
function c100200186.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c100200186.thfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c100200186.thfilter,tp,LOCATION_GRAVE,0,1,nil) end
if chk==0 then return Duel.IsExistingTarget(c100200186.thfilter,tp,LOCATION_GRAVE,0,1,e:GetHandler()) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectTarget(tp,c100200186.thfilter,tp,LOCATION_GRAVE,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0)
......@@ -37,7 +37,9 @@ end
function c100200186.thop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
if Duel.SendtoHand(tc,nil,REASON_EFFECT)~=0 and tc:IsLocation(LOCATION_HAND) and (tc:IsSummonable(true,nil,1) or tc:IsMSetable(true,nil,1)) and Duel.SelectYesNo(tp,aux.Stringid(100200186,0)) then
if Duel.SendtoHand(tc,nil,REASON_EFFECT)~=0 and tc:IsLocation(LOCATION_HAND)
and (tc:IsSummonable(true,nil,1) or tc:IsMSetable(true,nil,1))
and Duel.SelectYesNo(tp,aux.Stringid(100200186,0)) then
local s1=tc:IsSummonable(true,nil,1)
local s2=tc:IsMSetable(true,nil,1)
if (s1 and s2 and Duel.SelectPosition(tp,tc,POS_FACEUP_ATTACK+POS_FACEDOWN_DEFENSE)==POS_FACEUP_ATTACK) or not s2 then
......
......@@ -50,6 +50,7 @@ function c100269001.spop(e,tp,eg,ep,ev,re,r,rp)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_ADD_TYPE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetValue(TYPE_TUNER)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
c:RegisterEffect(e1,true)
......
......@@ -30,6 +30,7 @@ function c100415024.counterfilter(c)
end
function c100415024.costfilter(c,tp)
return (c:IsSetCard(0x250) or c:IsType(TYPE_RITUAL)) and c:IsType(TYPE_MONSTER) and Duel.GetMZoneCount(tp,c)>0
and (c:IsControler(tp) or c:IsFaceup())
end
function c100415024.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
e:SetLabel(100)
......@@ -64,7 +65,8 @@ function c100415024.thfilter(c)
end
function c100415024.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) and Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP_DEFENSE)~=0 and Duel.IsExistingMatchingCard(c100415024.thfilter,tp,LOCATION_DECK,0,1,nil)
if c:IsRelateToEffect(e) and Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP_DEFENSE)~=0
and Duel.IsExistingMatchingCard(c100415024.thfilter,tp,LOCATION_DECK,0,1,nil)
and Duel.SelectYesNo(tp,aux.Stringid(100415024,1)) then
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
......
......@@ -30,6 +30,7 @@ function c100415025.counterfilter(c)
end
function c100415025.costfilter(c,tp)
return (c:IsSetCard(0x250) or c:IsType(TYPE_RITUAL)) and c:IsType(TYPE_MONSTER) and Duel.GetMZoneCount(tp,c)>0
and (c:IsControler(tp) or c:IsFaceup())
end
function c100415025.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
e:SetLabel(100)
......@@ -64,7 +65,9 @@ function c100415025.tgfilter(c)
end
function c100415025.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) and Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP_DEFENSE)~=0 and Duel.IsExistingMatchingCard(c100415025.tgfilter,tp,LOCATION_REMOVED,0,1,nil) and Duel.SelectYesNo(tp,aux.Stringid(100415025,1)) then
if c:IsRelateToEffect(e) and Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP_DEFENSE)~=0
and Duel.IsExistingMatchingCard(c100415025.tgfilter,tp,LOCATION_REMOVED,0,1,nil)
and Duel.SelectYesNo(tp,aux.Stringid(100415025,1)) then
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,c100415025.tgfilter,tp,LOCATION_REMOVED,0,1,1,nil)
......
......@@ -30,6 +30,7 @@ function c100415026.counterfilter(c)
end
function c100415026.costfilter(c,tp)
return (c:IsSetCard(0x250) or c:IsType(TYPE_RITUAL)) and c:IsType(TYPE_MONSTER) and Duel.GetMZoneCount(tp,c)>0
and (c:IsControler(tp) or c:IsFaceup())
end
function c100415026.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
e:SetLabel(100)
......@@ -63,7 +64,9 @@ function c100415026.rbfilter(c,e,tp)
end
function c100415026.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) and Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP_DEFENSE)~=0 and Duel.IsExistingMatchingCard(aux.NecroValleyFilter(c100415026.rbfilter),tp,LOCATION_GRAVE,0,1,nil,e,tp) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.SelectYesNo(tp,aux.Stringid(100415026,1)) then
if c:IsRelateToEffect(e) and Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP_DEFENSE)~=0
and Duel.IsExistingMatchingCard(aux.NecroValleyFilter(c100415026.rbfilter),tp,LOCATION_GRAVE,0,1,nil,e,tp)
and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.SelectYesNo(tp,aux.Stringid(100415026,1)) then
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(c100415026.rbfilter),tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
......
......@@ -30,10 +30,12 @@ function c100415027.counterfilter(c)
end
function c100415027.costfilter(c,tp)
return (c:IsSetCard(0x250) or c:IsType(TYPE_RITUAL)) and c:IsType(TYPE_MONSTER) and Duel.GetMZoneCount(tp,c)>0
and (c:IsControler(tp) or c:IsFaceup())
end
function c100415027.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
e:SetLabel(100)
if chk==0 then return Duel.GetCustomActivityCount(100415027,tp,ACTIVITY_SPSUMMON)==0 and Duel.CheckReleaseGroupEx(tp,c100415027.costfilter,1,e:GetHandler(),tp) end
if chk==0 then return Duel.GetCustomActivityCount(100415027,tp,ACTIVITY_SPSUMMON)==0
and Duel.CheckReleaseGroupEx(tp,c100415027.costfilter,1,e:GetHandler(),tp) end
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
......@@ -63,7 +65,9 @@ function c100415027.drfilter(c)
end
function c100415027.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) and Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP_DEFENSE)~=0 and Duel.IsExistingMatchingCard(c100415027.drfilter,tp,LOCATION_HAND,0,1,nil) and Duel.IsPlayerCanDraw(tp,1) and Duel.SelectYesNo(tp,aux.Stringid(100415027,1)) then
if c:IsRelateToEffect(e) and Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP_DEFENSE)~=0
and Duel.IsExistingMatchingCard(c100415027.drfilter,tp,LOCATION_HAND,0,1,nil)
and Duel.IsPlayerCanDraw(tp,1) and Duel.SelectYesNo(tp,aux.Stringid(100415027,1)) then
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONFIRM)
local g=Duel.SelectMatchingCard(tp,c100415027.drfilter,tp,LOCATION_HAND,0,1,1,nil)
......
......@@ -30,10 +30,12 @@ function c100415028.counterfilter(c)
end
function c100415028.costfilter(c,tp)
return (c:IsSetCard(0x250) or c:IsType(TYPE_RITUAL)) and c:IsType(TYPE_MONSTER) and Duel.GetMZoneCount(tp,c)>0
and (c:IsControler(tp) or c:IsFaceup())
end
function c100415028.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
e:SetLabel(100)
if chk==0 then return Duel.GetCustomActivityCount(100415028,tp,ACTIVITY_SPSUMMON)==0 and Duel.CheckReleaseGroupEx(tp,c100415028.costfilter,1,e:GetHandler(),tp) end
if chk==0 then return Duel.GetCustomActivityCount(100415028,tp,ACTIVITY_SPSUMMON)==0
and Duel.CheckReleaseGroupEx(tp,c100415028.costfilter,1,e:GetHandler(),tp) end
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
......@@ -64,7 +66,9 @@ function c100415028.thfilter(c)
end
function c100415028.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) and Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP_DEFENSE)~=0 and Duel.IsExistingMatchingCard(c100415028.thfilter,tp,LOCATION_DECK,0,1,nil) and Duel.SelectYesNo(tp,aux.Stringid(100415028,1)) then
if c:IsRelateToEffect(e) and Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP_DEFENSE)~=0
and Duel.IsExistingMatchingCard(c100415028.thfilter,tp,LOCATION_DECK,0,1,nil)
and Duel.SelectYesNo(tp,aux.Stringid(100415028,1)) then
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c100415028.thfilter,tp,LOCATION_DECK,0,1,1,nil)
......
......@@ -23,7 +23,8 @@ function c100415035.filter(c)
end
function c100415035.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return false end
if chk==0 then return Duel.IsExistingTarget(c100415035.filter,tp,LOCATION_MZONE,0,1,nil) and Duel.IsExistingTarget(Card.IsFaceup,tp,0,LOCATION_MZONE,1,nil) end
if chk==0 then return Duel.IsExistingTarget(c100415035.filter,tp,LOCATION_MZONE,0,1,nil)
and Duel.IsExistingTarget(Card.IsFaceup,tp,0,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
local g1=Duel.SelectTarget(tp,c100415035.filter,tp,LOCATION_MZONE,0,1,1,nil)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
......
......@@ -23,7 +23,8 @@ function c100415036.cfilter(c,tp)
return c:GetSummonPlayer()==1-tp and c:IsAbleToDeck()
end
function c100415036.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(c100415036.filter,tp,LOCATION_MZONE,0,1,nil) and Duel.GetCurrentChain()==0 and eg:IsExists(c100415036.cfilter,1,nil,tp)
return Duel.IsExistingMatchingCard(c100415036.filter,tp,LOCATION_MZONE,0,1,nil)
and Duel.GetCurrentChain()==0 and eg:IsExists(c100415036.cfilter,1,nil,tp)
end
function c100415036.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
......
......@@ -2,28 +2,28 @@
--Raidraptor - Strangle Lanius
--Script by JoyJ
function c101102005.initial_effect(c)
--spsummon
--self ss
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(101102005,0))
e1:SetDescription(aux.Stringid(101102005,1))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetRange(LOCATION_MZONE)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,101102005)
e1:SetCondition(c101102005.spcon)
e1:SetTarget(c101102005.sptg)
e1:SetOperation(c101102005.spop)
e1:SetCondition(c101102005.sscon)
e1:SetTarget(c101102005.sstg)
e1:SetOperation(c101102005.ssop)
c:RegisterEffect(e1)
--self ss
--spsummon
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(101102005,1))
e2:SetDescription(aux.Stringid(101102005,0))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_HAND)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,101102005+100)
e2:SetCondition(c101102005.sscon)
e2:SetTarget(c101102005.sstg)
e2:SetOperation(c101102005.ssop)
e2:SetCondition(c101102005.spcon)
e2:SetTarget(c101102005.sptg)
e2:SetOperation(c101102005.spop)
c:RegisterEffect(e2)
end
function c101102005.ssfilter(c)
......
......@@ -35,7 +35,8 @@ function c101102014.thfilter(c)
end
function c101102014.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c101102014.desfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c101102014.desfilter,tp,LOCATION_MZONE,0,1,nil) end
if chk==0 then return Duel.IsExistingTarget(c101102014.desfilter,tp,LOCATION_MZONE,0,1,nil)
and Duel.IsExistingMatchingCard(c101102014.thfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectTarget(tp,c101102014.desfilter,tp,LOCATION_MZONE,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
......@@ -54,7 +55,9 @@ function c101102014.operation(e,tp,eg,ep,ev,re,r,rp)
end
function c101102014.thfilter1(c,tp)
local mg=c:GetMaterial()
return mg and c:IsPreviousPosition(POS_FACEUP) and c:GetPreviousControler()==tp and c:GetPreviousTypeOnField()&TYPE_FUSION~=0 and mg:IsExists(Card.IsType,1,nil,TYPE_EFFECT) and (c:IsReason(REASON_BATTLE) or c:IsReason(REASON_EFFECT) and c:GetReasonPlayer()==1-tp)
return mg and c:IsPreviousPosition(POS_FACEUP) and c:GetPreviousControler()==tp
and c:GetPreviousTypeOnField()&TYPE_FUSION~=0 and mg:IsExists(Card.IsType,1,nil,TYPE_EFFECT)
and (c:IsReason(REASON_BATTLE) or c:IsReason(REASON_EFFECT) and c:GetReasonPlayer()==1-tp)
end
function c101102014.thcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c101102014.thfilter1,1,nil,tp)
......
......@@ -35,14 +35,12 @@ function c101102015.spfilter(c,tp)
and c:GetPreviousControler()==tp and c:IsPreviousLocation(LOCATION_MZONE) and c:IsPreviousPosition(POS_FACEUP)
end
function c101102015.spcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return eg:IsExists(c101102015.spfilter,1,nil,tp) and Duel.GetTurnPlayer()~=tp
end
function c101102015.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end
function c101102015.desfilter(c,e,tp)
return c:IsFaceup() and c:IsSetCard(0x24d)
......@@ -61,13 +59,12 @@ function c101102015.spop(e,tp,eg,ep,ev,re,r,rp)
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectMatchingCard(tp,c101102015.desfilter,tp,LOCATION_MZONE,0,1,1,nil,e,tp)
if g:GetCount()>0 then
if Duel.Destroy(g,REASON_EFFECT)~=0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg=Duel.SelectMatchingCard(tp,c101102015.sffilter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp,nil)
if sg:GetCount()>0 then
Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP)
end
Duel.HintSelection(g)
if Duel.Destroy(g,REASON_EFFECT)~=0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg=Duel.SelectMatchingCard(tp,c101102015.sffilter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp,nil)
if sg:GetCount()>0 then
Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP)
end
end
end
......
......@@ -51,7 +51,7 @@ function c101102018.spfilter1(c,e,tp)
and Duel.IsExistingMatchingCard(c101102018.spfilter2,tp,LOCATION_DECK,0,1,nil,e,tp,c)
end
function c101102018.spfilter2(c,e,tp,tc)
return c:IsSetCard(0xb2) and not c:IsOriginalCodeRule(tc:GetOriginalCodeRule()) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
return c:IsSetCard(0xb2) and not c:IsCode(tc:GetCode()) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c101102018.sptg2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and e:GetHandler():IsAbleToHand()
......
......@@ -8,7 +8,7 @@ function c101102032.initial_effect(c)
--destroy
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(101102032,0))
e1:SetCategory(CATEGORY_DESTROY+CATEGORY_SPECIAL_SUMMON)
e1:SetCategory(CATEGORY_DESTROY)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
......
......@@ -63,7 +63,7 @@ function c101102039.poscon(e,tp,eg,ep,ev,re,r,rp)
return not e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED) and rp==1-tp and re:IsActiveType(TYPE_MONSTER)
end
function c101102039.posfilter(c)
return c:IsPosition(POS_FACEDOWN_DEFENSE) and c:IsCanChangePosition()
return c:IsPosition(POS_FACEDOWN_DEFENSE) and c:IsAttribute(ATTRIBUTE_WATER) and c:IsCanChangePosition()
end
function c101102039.postg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c101102039.posfilter,tp,LOCATION_MZONE,0,1,nil) end
......
......@@ -8,7 +8,7 @@ function c101102043.initial_effect(c)
--destroy
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(101102043,0))
e1:SetCategory(CATEGORY_DESTROY)
e1:SetCategory(CATEGORY_REMOVE)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetCountLimit(1)
......@@ -61,20 +61,24 @@ function c101102043.spfilter(c,e,tp)
return c:IsSetCard(0x24e) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c101102043.fselect(g)
return g:GetClassCount(Card.GetOriginalRace)==1
and g:GetClassCount(Card.GetOriginalAttribute)==1
return g:GetClassCount(Card.GetRace)==1
and g:GetClassCount(Card.GetAttribute)==1
end
function c101102043.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
local g=Duel.GetMatchingGroup(c101102043.spfilter,tp,LOCATION_DECK,0,nil,e,tp)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>1 and g:CheckSubGroup(c101102043.fselect,2,2) end
if chk==0 then
local g=Duel.GetMatchingGroup(c101102043.spfilter,tp,LOCATION_DECK,0,nil,e,tp)
return Duel.GetLocationCount(tp,LOCATION_MZONE)>=2
and not Duel.IsPlayerAffectedByEffect(tp,59822133)
and g:CheckSubGroup(c101102043.fselect,2,2) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,2,tp,LOCATION_DECK)
end
function c101102043.spop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=1 then return end
if Duel.GetLocationCount(tp,LOCATION_MZONE)<2
or Duel.IsPlayerAffectedByEffect(tp,59822133) then return end
local g=Duel.GetMatchingGroup(c101102043.spfilter,tp,LOCATION_DECK,0,nil,e,tp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg=g:SelectSubGroup(tp,c101102043.fselect,false,2,2)
if #sg>0 then
if sg then
Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP)
end
end
......@@ -9,6 +9,7 @@ function c101102051.initial_effect(c)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,101102051)
e1:SetHintTiming(0,TIMING_MAIN_END)
e1:SetCondition(c101102051.condition)
e1:SetCost(c101102051.cost)
e1:SetTarget(c101102051.target)
......@@ -24,7 +25,7 @@ end
function c101102051.cefilter(c,tc,ct,e,tp)
if not c:IsType(TYPE_XYZ) then return false end
local r=c:GetRank()-tc:GetRank()
return (c:IsSetCard(0xba) or c:IsSetCard(0x10db) or c:IsSetCard(0x2073))
return c:IsSetCard(0xba,0x10db,0x2073)
and tc:IsCanBeXyzMaterial(c) and r>0 and ct>=r
and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_XYZ,tp,false,false)
and Duel.GetLocationCountFromEx(tp,tp,tc,c)>0
......@@ -59,7 +60,7 @@ end
function c101102051.tgefilter(c,tc,e,tp,rank)
if not c:IsType(TYPE_XYZ) then return false end
local r=c:GetRank()-tc:GetRank()
return (c:IsSetCard(0xba) or c:IsSetCard(0x10db) or c:IsSetCard(0x2073))
return c:IsSetCard(0xba,0x10db,0x2073)
and tc:IsCanBeXyzMaterial(c) and r==rank
and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_XYZ,tp,false,false)
and Duel.GetLocationCountFromEx(tp,tp,tc,c)>0
......
......@@ -43,7 +43,7 @@ end
function c101102056.distg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and aux.disfilter1(chkc) end
if chk==0 then return Duel.IsExistingTarget(aux.disfilter1,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DISABLE)
local g=Duel.SelectTarget(tp,aux.disfilter1,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_DISABLE,g,1,0,0)
end
......@@ -51,16 +51,13 @@ function c101102056.disop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if tc:IsFaceup() and tc:IsRelateToEffect(e) then
Duel.NegateRelatedChain(tc,RESET_TURN_SET)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetCode(EFFECT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e2:SetCode(EFFECT_DISABLE_EFFECT)
e2:SetValue(RESET_TURN_SET)
e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
......
......@@ -23,11 +23,11 @@ function c101102061.initial_effect(c)
end
function c101102061.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK+LOCATION_GRAVE)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,0,tp,LOCATION_DECK+LOCATION_GRAVE)
end
function c101102061.thfilter(c)
if not c:IsAbleToHand() then return false end
return c:IsLocation(LOCATION_DECK) and (c:IsSetCard(0xb2) or c:IsSetCard(0x107)) and c:IsType(TYPE_MONSTER)
return c:IsLocation(LOCATION_DECK) and c:IsSetCard(0xb2,0x107) and c:IsType(TYPE_MONSTER)
or c:IsLocation(LOCATION_GRAVE) and c:IsCode(19814508)
end
function c101102061.activate(e,tp,eg,ep,ev,re,r,rp)
......@@ -76,5 +76,5 @@ function c101102061.exop(e,tp,eg,ep,ev,re,r,rp)
Duel.RegisterFlagEffect(tp,101102061,RESET_PHASE+PHASE_END,0,1)
end
function c101102061.estg(e,c)
return c:IsSetCard(0xb2) or c:IsSetCard(0x107)
return c:IsSetCard(0xb2,0x107)
end
......@@ -8,13 +8,13 @@ function c101102062.initial_effect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,101102062+EFFECT_COUNT_CODE_OATH)
e1:SetTarget(c101102062.target)
e1:SetOperation(c101102062.activate)
e1:SetCountLimit(1,101102062+EFFECT_COUNT_CODE_OATH)
c:RegisterEffect(e1)
end
function c101102062.filter(c)
return (c:IsSetCard(0xb2) or c:IsSetCard(0x107)) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand()
return c:IsSetCard(0xb2,0x107) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand()
and (c:IsFaceup() or c:IsLocation(LOCATION_GRAVE))
end
function c101102062.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
......@@ -27,7 +27,7 @@ function c101102062.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
Duel.SetOperationInfo(0,CATEGORY_RECOVER,nil,0,tp,500)
end
function c101102062.cfilter(c)
return (c:IsSetCard(0xb2) or c:IsSetCard(0x107)) and c:IsType(TYPE_MONSTER) and not c:IsPublic() and c:IsAbleToDeck()
return c:IsSetCard(0xb2,0x107) and c:IsType(TYPE_MONSTER) and not c:IsPublic() and c:IsAbleToDeck()
end
function c101102062.activate(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
......
......@@ -20,7 +20,7 @@ function c101102063.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and c101102063.filter(chkc,e,tp) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingTarget(c101102063.filter,tp,LOCATION_GRAVE,0,1,nil,e,tp)
and Duel.GetMatchingGroupCount(Card.IsRace,tp,LOCATION_HAND,0,nil,RACE_FIEND)>0 end
and Duel.IsExistingMatchingCard(Card.IsRace,tp,LOCATION_HAND,0,1,nil,RACE_FIEND) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,c101102063.filter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0)
......
......@@ -27,7 +27,7 @@ function c101102069.cost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=Duel.SelectMatchingCard(tp,c101102069.cfilter,tp,LOCATION_MZONE,0,1,1,nil,tp):GetFirst()
c:RemoveOverlayCard(tp,1,1,REASON_COST)
local tc=Duel.GetOperatedGroup():GetFirst()
if tc:IsSetCard(0xba) or tc:IsSetCard(0x10db) or tc:IsSetCard(0x2073) then
if tc:IsSetCard(0xba,0x10db,0x2073) then
e:SetLabel(1)
else
e:SetLabel(0)
......
......@@ -52,12 +52,14 @@ function c101102071.spop(e,tp,eg,ep,ev,re,r,rp)
end
end
function c101102071.cfilter(c,tp)
return c:IsRace(RACE_BEAST) and c:IsFaceup() and Duel.IsExistingMatchingCard(c101102071.cfilter1,tp,LOCATION_MZONE,0,1,c,tp)
return c:IsRace(RACE_BEAST) and c:IsFaceup()
and Duel.IsExistingMatchingCard(c101102071.cfilter1,tp,LOCATION_MZONE,0,1,c,c,tp)
end
function c101102071.cfilter1(c,tp)
return c:IsRace(RACE_BEASTWARRIOR) and c:IsFaceup() and Duel.IsExistingMatchingCard(c101102071.cfilter2,tp,LOCATION_MZONE,0,1,c,tp)
function c101102071.cfilter1(c,c1,tp)
return c:IsRace(RACE_BEASTWARRIOR) and c:IsFaceup()
and Duel.IsExistingMatchingCard(c101102071.cfilter2,tp,LOCATION_MZONE,0,1,Group.FromCards(c,c1))
end
function c101102071.cfilter2(c,tp)
function c101102071.cfilter2(c)
return c:IsRace(RACE_WINDBEAST) and c:IsFaceup()
end
function c101102071.negcon(e,tp,eg,ep,ev,re,r,rp)
......@@ -69,7 +71,7 @@ end
function c101102071.negtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsOnField() and chkc:IsControler(1-tp) and c101102071.negfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c101102071.negfilter,tp,0,LOCATION_ONFIELD,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DISABLE)
Duel.SelectTarget(tp,c101102071.negfilter,tp,0,LOCATION_ONFIELD,1,1,nil)
end
function c101102071.negop(e,tp,eg,ep,ev,re,r,rp)
......
......@@ -7,6 +7,7 @@ function c101102074.initial_effect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,101102074+EFFECT_COUNT_CODE_OATH)
e1:SetHintTiming(TIMING_MAIN_END)
e1:SetCondition(c101102074.condition)
e1:SetCost(c101102074.cost)
e1:SetTarget(c101102074.target)
......
......@@ -20,7 +20,7 @@ function c101102076.initial_effect(c)
c:RegisterEffect(e2)
end
function c101102076.filter(c)
return (c:IsSetCard(0xb2) or c:IsSetCard(0x107)) and c:IsType(TYPE_MONSTER)
return c:IsSetCard(0xb2,0x107) and c:IsType(TYPE_MONSTER)
end
function c101102076.spfilter(c,e,tp)
return c101102076.filter(c) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE)
......
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