Commit 6975d6f4 authored by salix5's avatar salix5

Merge branch 'master' into INFO

parents 82261818 11f6d8d8
......@@ -43,7 +43,7 @@ function c13455674.rmtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE+LOCATION_MZONE) and chkc:IsControler(1-tp) and c13455674.rmfilter(chkc) end
if chk==0 then return ct>0 and Duel.IsExistingTarget(c13455674.rmfilter,tp,0,LOCATION_GRAVE+LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectTarget(tp,c13455674.rmfilter,tp,0,LOCATION_GRAVE+LOCATION_MZONE,1,ct,nil)
local g=aux.SelectTargetFromFieldFirst(tp,c13455674.rmfilter,tp,0,LOCATION_GRAVE+LOCATION_MZONE,1,ct,nil)
if g:IsExists(Card.IsLocation,1,nil,LOCATION_GRAVE) then
Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,g:GetCount(),1-tp,LOCATION_GRAVE)
else
......
......@@ -84,4 +84,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
end
\ No newline at end of file
end
......@@ -98,4 +98,4 @@ function s.tgop(e,tp,eg,ep,ev,re,r,rp)
end
end
end
end
\ No newline at end of file
end
......@@ -14,7 +14,7 @@ function c15335853.initial_effect(c)
e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e2:SetRange(LOCATION_MZONE)
e2:SetCode(EFFECT_INDESTRUCTABLE_BATTLE)
e2:SetCondition(c15335853.indcon)
e2:SetCondition(aux.tkfcon)
e2:SetValue(1)
c:RegisterEffect(e2)
local e3=e2:Clone()
......@@ -47,9 +47,6 @@ function c15335853.lvval(e,c)
local tp=c:GetControler()
return Duel.GetMatchingGroup(Card.IsCode,tp,LOCATION_MZONE,0,nil,31533705):GetSum(Card.GetLevel)
end
function c15335853.indcon(e)
return Duel.IsExistingMatchingCard(Card.IsType,e:GetHandlerPlayer(),LOCATION_MZONE,0,1,nil,TYPE_TOKEN)
end
function c15335853.rmcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckReleaseGroup(tp,Card.IsType,1,nil,TYPE_TOKEN) end
local g=Duel.SelectReleaseGroup(tp,Card.IsType,1,1,nil,TYPE_TOKEN)
......
......@@ -52,7 +52,7 @@ function c15862758.operation(e,tp,eg,ep,ev,re,r,rp)
e2:SetTargetRange(0,LOCATION_MZONE)
e2:SetCondition(c15862758.effcon)
e2:SetLabel(turn)
e2:SetReset(RESET_EVENT+RESETS_WITHOUT_TEMP_REMOVE)
e2:SetReset(RESET_EVENT+RESETS_STANDARD)
c:RegisterEffect(e2)
local e3=e2:Clone()
e3:SetCode(EFFECT_MUST_ATTACK_MONSTER)
......@@ -66,7 +66,7 @@ function c15862758.operation(e,tp,eg,ep,ev,re,r,rp)
e4:SetCondition(c15862758.wincon)
e4:SetOperation(c15862758.winop)
e4:SetLabel(turn)
e4:SetReset(RESET_EVENT+RESETS_WITHOUT_TEMP_REMOVE)
e4:SetReset(RESET_EVENT+RESETS_STANDARD)
c:RegisterEffect(e4)
end
function c15862758.atkcon(e)
......
......@@ -82,4 +82,4 @@ function s.setop(e,tp,eg,ep,ev,re,r,rp)
e1:SetValue(TYPE_TRAP+TYPE_CONTINUOUS)
tc:RegisterEffect(e1)
end
end
\ No newline at end of file
end
......@@ -9,7 +9,7 @@ function c16404809.initial_effect(c)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(16404809,0))
e2:SetCategory(CATEGORY_TOHAND+CATEGORY_DECKDES)
e2:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND+CATEGORY_DECKDES)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetRange(LOCATION_MZONE)
e2:SetCode(EVENT_PHASE+PHASE_END)
......
......@@ -14,7 +14,7 @@ function c16943770.initial_effect(c)
e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e2:SetRange(LOCATION_MZONE)
e2:SetCode(EFFECT_INDESTRUCTABLE_BATTLE)
e2:SetCondition(c16943770.indcon)
e2:SetCondition(aux.tkfcon)
e2:SetValue(1)
c:RegisterEffect(e2)
local e3=e2:Clone()
......@@ -36,9 +36,6 @@ function c16943770.lvval(e,c)
local tp=c:GetControler()
return Duel.GetMatchingGroup(Card.IsCode,tp,LOCATION_MZONE,0,nil,31533705):GetSum(Card.GetLevel)
end
function c16943770.indcon(e)
return Duel.IsExistingMatchingCard(Card.IsType,e:GetHandlerPlayer(),LOCATION_MZONE,0,1,nil,TYPE_TOKEN)
end
function c16943770.cfilter(c)
return c:IsSetCard(0x101b) and not c:IsCode(16943770) and c:IsAbleToRemoveAsCost()
end
......
......@@ -81,7 +81,8 @@ function c17228908.tkop(e,tp,eg,ep,ev,re,r,rp)
end
end
function c17228908.tgcon(e)
return Duel.IsExistingMatchingCard(Card.IsType,e:GetHandlerPlayer(),0,LOCATION_ONFIELD,1,nil,TYPE_TOKEN)
local tp=e:GetHandlerPlayer()
return aux.tkfcon(e,1-tp)
end
function c17228908.tglimit(e,c)
return not c:IsType(TYPE_TOKEN)
......
......@@ -67,4 +67,4 @@ function s.atkcon(e)
end
function s.atktg(e,c)
return c:IsType(TYPE_SYNCHRO) and c:IsFaceup()
end
\ No newline at end of file
end
......@@ -72,4 +72,4 @@ function c17462320.thop(e,tp,eg,ep,ev,re,r,rp)
if tc:IsRelateToEffect(e) then
Duel.SendtoHand(tc,nil,REASON_EFFECT)
end
end
\ No newline at end of file
end
......@@ -55,4 +55,4 @@ function c17550376.atkop(e,tp,eg,ep,ev,re,r,rp)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_DISABLE+RESET_PHASE+PHASE_END)
c:RegisterEffect(e1)
end
end
\ No newline at end of file
end
......@@ -63,4 +63,4 @@ function s.tdop(e,tp,eg,ep,ev,re,r,rp)
if g:GetCount()>0 then
Duel.SendtoDeck(g,nil,SEQ_DECKSHUFFLE,REASON_EFFECT)
end
end
\ No newline at end of file
end
......@@ -56,4 +56,4 @@ function c18494511.splimit(e,c)
end
function c18494511.codecon(e)
return e:GetHandler():GetEquipCount()>0
end
\ No newline at end of file
end
......@@ -81,4 +81,4 @@ function c19403423.nsumsuc(e,tp,eg,ep,ev,re,r,rp)
end
function c19403423.efun(e,ep,tp)
return ep==tp or not e:IsActiveType(TYPE_MONSTER)
end
\ No newline at end of file
end
......@@ -11,7 +11,7 @@ function c1942635.initial_effect(c)
e2:SetCode(EFFECT_CANNOT_SELECT_BATTLE_TARGET)
e2:SetRange(LOCATION_SZONE)
e2:SetTargetRange(0,LOCATION_MZONE)
e2:SetCondition(c1942635.atkcon)
e2:SetCondition(aux.tkfcon)
e2:SetValue(c1942635.atkval)
c:RegisterEffect(e2)
--draw
......@@ -27,9 +27,6 @@ function c1942635.initial_effect(c)
e3:SetOperation(c1942635.drop)
c:RegisterEffect(e3)
end
function c1942635.atkcon(e)
return Duel.IsExistingMatchingCard(Card.IsType,e:GetHandlerPlayer(),LOCATION_MZONE,0,1,nil,TYPE_TOKEN)
end
function c1942635.atkval(e,c)
return c:IsFaceup() and c:IsSetCard(0x134) and c:IsType(TYPE_EFFECT)
end
......
......@@ -77,4 +77,4 @@ function s.tunop(e,tp,eg,ep,ev,re,r,rp)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e1)
end
end
\ No newline at end of file
end
......@@ -54,7 +54,7 @@ function c197042.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_ONFIELD+LOCATION_GRAVE) and chkc:IsControler(1-tp) and chkc:IsAbleToRemove() end
if chk==0 then return Duel.IsExistingTarget(Card.IsAbleToRemove,tp,0,LOCATION_ONFIELD+LOCATION_GRAVE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectTarget(tp,Card.IsAbleToRemove,tp,0,LOCATION_ONFIELD+LOCATION_GRAVE,1,1,nil)
local g=aux.SelectTargetFromFieldFirst(tp,Card.IsAbleToRemove,tp,0,LOCATION_ONFIELD+LOCATION_GRAVE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,1,0,0)
end
function c197042.xyzfilter(c)
......
......@@ -14,7 +14,7 @@ function c20368763.initial_effect(c)
e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e2:SetRange(LOCATION_MZONE)
e2:SetCode(EFFECT_INDESTRUCTABLE_BATTLE)
e2:SetCondition(c20368763.indcon)
e2:SetCondition(aux.tkfcon)
e2:SetValue(1)
c:RegisterEffect(e2)
local e3=e2:Clone()
......@@ -49,9 +49,6 @@ function c20368763.lvval(e,c)
local tp=c:GetControler()
return Duel.GetMatchingGroup(Card.IsCode,tp,LOCATION_MZONE,0,nil,31533705):GetSum(Card.GetLevel)
end
function c20368763.indcon(e)
return Duel.IsExistingMatchingCard(Card.IsType,e:GetHandlerPlayer(),LOCATION_MZONE,0,1,nil,TYPE_TOKEN)
end
function c20368763.cfilter(c,tp)
return c:IsPreviousLocation(LOCATION_MZONE) and c:IsPreviousControler(tp) and c:IsReason(REASON_COST)
end
......
......@@ -70,4 +70,4 @@ function c20515672.tdop(e,tp,eg,ep,ev,re,r,rp)
Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP)
end
end
end
\ No newline at end of file
end
......@@ -25,17 +25,17 @@ function s.initial_effect(c)
--workaround
if not aux.rit_mat_hack_check then
aux.rit_mat_hack_check=true
function aux.rit_mat_hack_exmat_filter(c)
return c:IsHasEffect(EFFECT_EXTRA_RITUAL_MATERIAL,c:GetControler()) and c:IsLocation(LOCATION_EXTRA)
function aux.rit_mat_hack_exmat_filter(tc)
return tc:IsHasEffect(EFFECT_EXTRA_RITUAL_MATERIAL,tc:GetControler()) and tc:IsLocation(LOCATION_EXTRA)
end
function aux.RitualCheckGreater(g,c,lv)
function aux.RitualCheckGreater(g,rc,lv)
if g:FilterCount(aux.rit_mat_hack_exmat_filter,nil)>1 then return false end
Duel.SetSelectedCard(g)
return g:CheckWithSumGreater(Card.GetRitualLevel,lv,c)
return g:CheckWithSumGreater(Card.GetRitualLevel,lv,rc)
end
function aux.RitualCheckEqual(g,c,lv)
function aux.RitualCheckEqual(g,rc,lv)
if g:FilterCount(aux.rit_mat_hack_exmat_filter,nil)>1 then return false end
return g:CheckWithSumEqual(Card.GetRitualLevel,lv,#g,#g,c)
return g:CheckWithSumEqual(Card.GetRitualLevel,lv,#g,#g,rc)
end
_ReleaseRitualMaterial=Duel.ReleaseRitualMaterial
function Duel.ReleaseRitualMaterial(mat)
......
......@@ -129,4 +129,4 @@ function c2116237.thop(e,tp,eg,ep,ev,re,r,rp)
if c:IsRelateToEffect(e) then
Duel.SendtoHand(c,nil,REASON_EFFECT)
end
end
\ No newline at end of file
end
......@@ -90,4 +90,4 @@ function c21368273.lvop(e,tp,eg,ep,ev,re,r,rp)
end
function c21368273.splimit(e,c)
return not c:IsType(TYPE_SYNCHRO) and c:IsLocation(LOCATION_EXTRA)
end
\ No newline at end of file
end
......@@ -9,7 +9,7 @@ function c22110647.initial_effect(c)
e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e2:SetRange(LOCATION_MZONE)
e2:SetCode(EFFECT_INDESTRUCTABLE_BATTLE)
e2:SetCondition(c22110647.indcon)
e2:SetCondition(aux.tkfcon)
e2:SetValue(1)
c:RegisterEffect(e2)
local e3=e2:Clone()
......@@ -39,9 +39,6 @@ function c22110647.initial_effect(c)
e5:SetOperation(c22110647.desop)
c:RegisterEffect(e5)
end
function c22110647.indcon(e)
return Duel.IsExistingMatchingCard(Card.IsType,e:GetHandlerPlayer(),LOCATION_MZONE,0,1,nil,TYPE_TOKEN)
end
function c22110647.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end
e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST)
......
......@@ -31,10 +31,10 @@ function c22404675.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
end
function c22404675.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not Duel.IsPlayerAffectedByEffect(tp,59822133) and c:IsRelateToEffect(e) then
if c:IsRelateToEffect(e) then
if Duel.SpecialSummonStep(c,0,tp,tp,false,false,POS_FACEUP) then
if Duel.GetLocationCount(1-tp,LOCATION_MZONE,tp)>0
and Duel.IsPlayerCanSpecialSummonMonster(tp,22404676,0,TYPES_TOKEN_MONSTER,800,1000,1,RACE_THUNDER,ATTRIBUTE_LIGHT,POS_FACEUP_DEFENSE) then
and Duel.IsPlayerCanSpecialSummonMonster(tp,22404676,0,TYPES_TOKEN_MONSTER,800,1000,1,RACE_THUNDER,ATTRIBUTE_LIGHT,POS_FACEUP_DEFENSE) and not Duel.IsPlayerAffectedByEffect(tp,59822133) then
local token=Duel.CreateToken(tp,22404676)
Duel.SpecialSummonStep(token,0,tp,1-tp,false,false,POS_FACEUP_DEFENSE)
end
......
......@@ -57,7 +57,7 @@ function c23776077.rmtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(1-tp) and chkc:IsLocation(LOCATION_MZONE+LOCATION_GRAVE) and c23776077.rmfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c23776077.rmfilter,tp,0,LOCATION_MZONE+LOCATION_GRAVE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectTarget(tp,c23776077.rmfilter,tp,0,LOCATION_MZONE+LOCATION_GRAVE,1,1,nil)
local g=aux.SelectTargetFromFieldFirst(tp,c23776077.rmfilter,tp,0,LOCATION_MZONE+LOCATION_GRAVE,1,1,nil)
if g:GetFirst():IsLocation(LOCATION_GRAVE) then
Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,1,1-tp,LOCATION_GRAVE)
else
......
......@@ -35,4 +35,4 @@ function c25774450.activate(e,tp,eg,ep,ev,re,r,rp)
Duel.GetControl(cc,1-tp)
end
end
end
\ No newline at end of file
end
......@@ -26,8 +26,10 @@ function c26118970.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_DECK)
local rc=e:GetHandler():GetReasonCard()
if rc and (rc:IsCode(73580471) or (rc:IsRace(RACE_PLANT) and rc:IsType(TYPE_SYNCHRO))) then
e:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_SEARCH+CATEGORY_TOHAND)
e:SetLabel(1)
else
e:SetCategory(CATEGORY_SPECIAL_SUMMON)
e:SetLabel(0)
end
end
......
......@@ -28,7 +28,7 @@ function c26211048.eqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0
and Duel.IsExistingTarget(c26211048.eqfilter,tp,0,LOCATION_GRAVE+LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
local g=Duel.SelectTarget(tp,c26211048.eqfilter,tp,0,LOCATION_GRAVE+LOCATION_MZONE,1,1,nil)
local g=aux.SelectTargetFromFieldFirst(tp,c26211048.eqfilter,tp,0,LOCATION_GRAVE+LOCATION_MZONE,1,1,nil)
if g:GetFirst():IsLocation(LOCATION_GRAVE) then
Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,g,1,0,0)
end
......
......@@ -40,4 +40,4 @@ function c27345070.activate(e,tp,eg,ep,ev,re,r,rp)
Duel.SendtoHand(tc,nil,REASON_EFFECT)
end
end
end
\ No newline at end of file
end
......@@ -27,9 +27,10 @@ function c2819435.initial_effect(c)
e6:SetDescription(aux.Stringid(2819435,1))
e6:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOKEN)
e6:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e6:SetProperty(EFFECT_FLAG_DELAY)
e6:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_ACTIVATE_CONDITION)
e6:SetCode(EVENT_CHAINING)
e6:SetRange(LOCATION_FZONE)
e6:SetCountLimit(1,EFFECT_COUNT_CODE_CHAIN)
e6:SetCondition(c2819435.spcon)
e6:SetCost(c2819435.cost)
e6:SetTarget(c2819435.sptg)
......@@ -81,14 +82,11 @@ function c2819435.thop(e,tp,eg,ep,ev,re,r,rp)
end
end
function c2819435.spcon(e,tp,eg,ep,ev,re,r,rp)
return rp==1-tp
return rp==1-tp and not aux.tkfcon(e,tp)
end
function c2819435.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsPlayerCanSpecialSummonMonster(tp,2819436,0xfa,TYPES_TOKEN_MONSTER,2000,2000,6,RACE_WYRM,ATTRIBUTE_WATER)
and e:GetHandler():GetFlagEffect(2819435)==0
and not Duel.IsExistingMatchingCard(Card.IsType,tp,LOCATION_ONFIELD,0,1,nil,TYPE_TOKEN) end
e:GetHandler():RegisterFlagEffect(2819435,RESET_EVENT+RESETS_STANDARD+RESET_CHAIN,0,1)
and Duel.IsPlayerCanSpecialSummonMonster(tp,2819436,0xfa,TYPES_TOKEN_MONSTER,2000,2000,6,RACE_WYRM,ATTRIBUTE_WATER) end
Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,0,0)
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
......
......@@ -49,7 +49,7 @@ end
function c28677304.disop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if c:IsRelateToEffect(e) and tc:IsFaceup() and tc:IsRelateToEffect(e) then
if c:IsRelateToEffect(e) and tc:IsFaceup() and tc:IsRelateToEffect(e) and not tc:IsImmuneToEffect(e) then
c:SetCardTarget(tc)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
......
This diff is collapsed.
......@@ -44,7 +44,7 @@ function s.srmtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE+LOCATION_ONFIELD) and chkc:IsAbleToRemove() end
if chk==0 then return Duel.IsExistingTarget(Card.IsAbleToRemove,tp,LOCATION_GRAVE+LOCATION_ONFIELD,LOCATION_GRAVE+LOCATION_ONFIELD,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectTarget(tp,Card.IsAbleToRemove,tp,LOCATION_GRAVE+LOCATION_ONFIELD,LOCATION_GRAVE+LOCATION_ONFIELD,1,1,nil)
local g=aux.SelectTargetFromFieldFirst(tp,Card.IsAbleToRemove,tp,LOCATION_GRAVE+LOCATION_ONFIELD,LOCATION_GRAVE+LOCATION_ONFIELD,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,1,0,0)
end
function s.srmop(e,tp,eg,ep,ev,re,r,rp)
......
--VS ラゼン
function c29302858.initial_effect(c)
--search
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(29302858,0))
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e1:SetType(EFFECT_TYPE_TRIGGER_O+EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCode(EVENT_SUMMON_SUCCESS)
e1:SetCountLimit(1,29302858)
e1:SetTarget(c29302858.thtg)
e1:SetOperation(c29302858.thop)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e2)
--show fire for indes
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(29302858,1))
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetCode(EVENT_FREE_CHAIN)
e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1,29302859)
e3:SetCost(c29302858.indescost)
e3:SetTarget(c29302858.indestg)
e3:SetOperation(c29302858.indesop)
c:RegisterEffect(e3)
--show fire and dark for destroy
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(29302858,2))
e4:SetCategory(CATEGORY_DESTROY)
e4:SetType(EFFECT_TYPE_QUICK_O)
e4:SetCode(EVENT_FREE_CHAIN)
e4:SetRange(LOCATION_MZONE)
e4:SetCountLimit(1,29302859)
e4:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e4:SetCost(c29302858.descost)
e4:SetTarget(c29302858.destg)
e4:SetOperation(c29302858.desop)
c:RegisterEffect(e4)
end
function c29302858.thfilter(c)
return c:IsSetCard(0x195) and c:IsType(TYPE_MONSTER) and not c:IsRace(RACE_WARRIOR) and c:IsAbleToHand()
end
function c29302858.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c29302858.thfilter,tp,LOCATION_DECK,0,1,nil)
and Duel.GetFlagEffect(tp,29302858)==0 end
Duel.RegisterFlagEffect(tp,29302858,RESET_CHAIN,0,1)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c29302858.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c29302858.thfilter,tp,LOCATION_DECK,0,1,1,nil)
if #g>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
function c29302858.indescfilter(c)
return c:IsAttribute(ATTRIBUTE_FIRE) and not c:IsPublic()
end
function c29302858.indescost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c29302858.indescfilter,tp,LOCATION_HAND,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONFIRM)
local g=Duel.SelectMatchingCard(tp,c29302858.indescfilter,tp,LOCATION_HAND,0,1,1,nil)
Duel.ConfirmCards(1-tp,g)
Duel.RaiseEvent(g,EVENT_CUSTOM+9091064,e,REASON_COST,tp,tp,0)
Duel.ShuffleHand(tp)
end
function c29302858.indestg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetFlagEffect(tp,29302858)==0 end
Duel.RegisterFlagEffect(tp,29302858,RESET_CHAIN,0,1)
end
function c29302858.indesop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToChain() then return end
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_INDESTRUCTABLE_EFFECT)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetValue(1)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,1)
c:RegisterEffect(e1)
end
function c29302858.descfilter(c)
return c:IsAttribute(ATTRIBUTE_FIRE+ATTRIBUTE_DARK) and not c:IsPublic()
end
function c29302858.descost(e,tp,eg,ep,ev,re,r,rp,chk)
local g=Duel.GetMatchingGroup(c29302858.descfilter,tp,LOCATION_HAND,0,nil)
if chk==0 then return g:CheckSubGroup(aux.gfcheck,2,2,Card.IsAttribute,ATTRIBUTE_FIRE,ATTRIBUTE_DARK) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONFIRM)
local sg=g:SelectSubGroup(tp,aux.gfcheck,false,2,2,Card.IsAttribute,ATTRIBUTE_FIRE,ATTRIBUTE_DARK)
Duel.ConfirmCards(1-tp,sg)
Duel.RaiseEvent(sg,EVENT_CUSTOM+9091064,e,REASON_COST,tp,tp,0)
Duel.ShuffleHand(tp)
end
function c29302858.destg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
local g=c:GetColumnGroup():Filter(Card.IsLocation,nil,LOCATION_MZONE)
if chk==0 then return #g>0 and Duel.GetFlagEffect(tp,29302858)==0 end
Duel.RegisterFlagEffect(tp,29302858,RESET_CHAIN,0,1)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,#g,0,0)
end
function c29302858.desop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToChain() then return end
local g=c:GetColumnGroup():Filter(Card.IsLocation,nil,LOCATION_MZONE)
Duel.Destroy(g,REASON_EFFECT)
end
--VS ラゼン
function c29302858.initial_effect(c)
--search
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(29302858,0))
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e1:SetType(EFFECT_TYPE_TRIGGER_O+EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCode(EVENT_SUMMON_SUCCESS)
e1:SetCountLimit(1,29302858)
e1:SetTarget(c29302858.thtg)
e1:SetOperation(c29302858.thop)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e2)
--show fire for indes
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(29302858,1))
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetCode(EVENT_FREE_CHAIN)
e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1,29302859)
e3:SetCost(c29302858.indescost)
e3:SetTarget(c29302858.indestg)
e3:SetOperation(c29302858.indesop)
c:RegisterEffect(e3)
--show fire and dark for destroy
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(29302858,2))
e4:SetCategory(CATEGORY_DESTROY)
e4:SetType(EFFECT_TYPE_QUICK_O)
e4:SetCode(EVENT_FREE_CHAIN)
e4:SetRange(LOCATION_MZONE)
e4:SetCountLimit(1,29302859)
e4:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e4:SetCost(c29302858.descost)
e4:SetTarget(c29302858.destg)
e4:SetOperation(c29302858.desop)
c:RegisterEffect(e4)
end
function c29302858.thfilter(c)
return c:IsSetCard(0x195) and c:IsType(TYPE_MONSTER) and not c:IsRace(RACE_WARRIOR) and c:IsAbleToHand()
end
function c29302858.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c29302858.thfilter,tp,LOCATION_DECK,0,1,nil)
and Duel.GetFlagEffect(tp,29302858)==0 end
Duel.RegisterFlagEffect(tp,29302858,RESET_CHAIN,0,1)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c29302858.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c29302858.thfilter,tp,LOCATION_DECK,0,1,1,nil)
if #g>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
function c29302858.indescfilter(c)
return c:IsAttribute(ATTRIBUTE_FIRE) and not c:IsPublic()
end
function c29302858.indescost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c29302858.indescfilter,tp,LOCATION_HAND,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONFIRM)
local g=Duel.SelectMatchingCard(tp,c29302858.indescfilter,tp,LOCATION_HAND,0,1,1,nil)
Duel.ConfirmCards(1-tp,g)
Duel.RaiseEvent(g,EVENT_CUSTOM+9091064,e,REASON_COST,tp,tp,0)
Duel.ShuffleHand(tp)
end
function c29302858.indestg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetFlagEffect(tp,29302858)==0 end
Duel.RegisterFlagEffect(tp,29302858,RESET_CHAIN,0,1)
end
function c29302858.indesop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToChain() then return end
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_INDESTRUCTABLE_EFFECT)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetValue(1)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,1)
c:RegisterEffect(e1)
end
function c29302858.descfilter(c)
return c:IsAttribute(ATTRIBUTE_FIRE+ATTRIBUTE_DARK) and not c:IsPublic()
end
function c29302858.descost(e,tp,eg,ep,ev,re,r,rp,chk)
local g=Duel.GetMatchingGroup(c29302858.descfilter,tp,LOCATION_HAND,0,nil)
if chk==0 then return g:CheckSubGroup(aux.gfcheck,2,2,Card.IsAttribute,ATTRIBUTE_FIRE,ATTRIBUTE_DARK) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONFIRM)
local sg=g:SelectSubGroup(tp,aux.gfcheck,false,2,2,Card.IsAttribute,ATTRIBUTE_FIRE,ATTRIBUTE_DARK)
Duel.ConfirmCards(1-tp,sg)
Duel.RaiseEvent(sg,EVENT_CUSTOM+9091064,e,REASON_COST,tp,tp,0)
Duel.ShuffleHand(tp)
end
function c29302858.destg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
local g=c:GetColumnGroup():Filter(Card.IsLocation,nil,LOCATION_MZONE)
if chk==0 then return #g>0 and Duel.GetFlagEffect(tp,29302858)==0 end
Duel.RegisterFlagEffect(tp,29302858,RESET_CHAIN,0,1)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,#g,0,0)
end
function c29302858.desop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToChain() then return end
local g=c:GetColumnGroup():Filter(Card.IsLocation,nil,LOCATION_MZONE)
Duel.Destroy(g,REASON_EFFECT)
end
......@@ -84,4 +84,4 @@ function s.spop2(e,tp,eg,ep,ev,re,r,rp)
Duel.ConfirmCards(1-tp,tc)
end
end
end
\ No newline at end of file
end
......@@ -89,23 +89,8 @@ end
function c29884951.remtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_ONFIELD+LOCATION_GRAVE) and c29884951.remfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c29884951.remfilter,tp,LOCATION_ONFIELD+LOCATION_GRAVE,LOCATION_ONFIELD+LOCATION_GRAVE,1,nil) end
local b1=Duel.IsExistingTarget(c29884951.remfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil)
local b2=Duel.IsExistingTarget(c29884951.remfilter,tp,LOCATION_GRAVE,LOCATION_GRAVE,1,nil)
local op=0
if b1 and b2 then
op=Duel.SelectOption(tp,aux.Stringid(29884951,3),aux.Stringid(29884951,4))
else
op=2
end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=nil
if op==0 then
g=Duel.SelectTarget(tp,c29884951.remfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil)
elseif op==1 then
g=Duel.SelectTarget(tp,c29884951.remfilter,tp,LOCATION_GRAVE,LOCATION_GRAVE,1,1,nil)
else
g=Duel.SelectTarget(tp,c29884951.remfilter,tp,LOCATION_ONFIELD+LOCATION_GRAVE,LOCATION_ONFIELD+LOCATION_GRAVE,1,1,nil)
end
local g=aux.SelectTargetFromFieldFirst(tp,c29884951.remfilter,tp,LOCATION_ONFIELD+LOCATION_GRAVE,LOCATION_ONFIELD+LOCATION_GRAVE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,1,0,0)
end
function c29884951.remop(e,tp,eg,ep,ev,re,r,rp)
......
......@@ -102,4 +102,4 @@ function c30095833.penop(e,tp,eg,ep,ev,re,r,rp)
if c:IsRelateToEffect(e) then
Duel.MoveToField(c,tp,tp,LOCATION_PZONE,POS_FACEUP,true)
end
end
\ No newline at end of file
end
......@@ -14,7 +14,7 @@ function c30811116.initial_effect(c)
e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e2:SetRange(LOCATION_MZONE)
e2:SetCode(EFFECT_INDESTRUCTABLE_BATTLE)
e2:SetCondition(c30811116.indcon)
e2:SetCondition(aux.tkfcon)
e2:SetValue(1)
c:RegisterEffect(e2)
local e3=e2:Clone()
......@@ -47,9 +47,6 @@ function c30811116.lvval(e,c)
local tp=c:GetControler()
return Duel.GetMatchingGroup(Card.IsCode,tp,LOCATION_MZONE,0,nil,31533705):GetSum(Card.GetLevel)
end
function c30811116.indcon(e)
return Duel.IsExistingMatchingCard(Card.IsType,e:GetHandlerPlayer(),LOCATION_MZONE,0,1,nil,TYPE_TOKEN)
end
function c30811116.spcon(e,tp,eg,ep,ev,re,r,rp)
return ep~=tp
end
......
......@@ -6,7 +6,7 @@ function c31480215.initial_effect(c)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetRange(LOCATION_MZONE)
e1:SetCode(EFFECT_INDESTRUCTABLE_BATTLE)
e1:SetCondition(c31480215.indcon)
e1:SetCondition(aux.tkfcon)
e1:SetValue(1)
c:RegisterEffect(e1)
local e2=e1:Clone()
......@@ -33,9 +33,6 @@ function c31480215.initial_effect(c)
e4:SetOperation(c31480215.lvop)
c:RegisterEffect(e4)
end
function c31480215.indcon(e)
return Duel.IsExistingMatchingCard(Card.IsType,e:GetHandlerPlayer(),LOCATION_MZONE,0,1,nil,TYPE_TOKEN)
end
function c31480215.spcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsLocation(LOCATION_GRAVE) and r==REASON_SYNCHRO
and e:GetHandler():GetReasonCard():IsRace(RACE_MACHINE)
......
......@@ -14,7 +14,7 @@ function c31533704.initial_effect(c)
e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e2:SetRange(LOCATION_MZONE)
e2:SetCode(EFFECT_INDESTRUCTABLE_BATTLE)
e2:SetCondition(c31533704.indcon)
e2:SetCondition(aux.tkfcon)
e2:SetValue(1)
c:RegisterEffect(e2)
local e3=e2:Clone()
......@@ -48,9 +48,6 @@ function c31533704.lvval(e,c)
local tp=c:GetControler()
return Duel.GetMatchingGroup(Card.IsCode,tp,LOCATION_MZONE,0,nil,31533705):GetSum(Card.GetLevel)
end
function c31533704.indcon(e)
return Duel.IsExistingMatchingCard(Card.IsType,e:GetHandlerPlayer(),LOCATION_MZONE,0,1,nil,TYPE_TOKEN)
end
function c31533704.spfilter(c,tp)
return c:IsControler(tp) and c:IsType(TYPE_TOKEN)
end
......
......@@ -74,4 +74,4 @@ function c31600513.thop(e,tp,eg,ep,ev,re,r,rp)
if tc:IsRelateToBattle() and tc:IsControler(1-tp) then
Duel.SendtoHand(tc,nil,REASON_EFFECT)
end
end
\ No newline at end of file
end
......@@ -75,4 +75,4 @@ function c31987203.penop(e,tp,eg,ep,ev,re,r,rp)
if c:IsRelateToEffect(e) then
Duel.MoveToField(c,tp,tp,LOCATION_PZONE,POS_FACEUP,true)
end
end
\ No newline at end of file
end
......@@ -4,7 +4,7 @@ function c32828635.initial_effect(c)
--salvage
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(32828635,0))
e2:SetCategory(CATEGORY_TOHAND)
e2:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_GRAVE)
e2:SetCondition(aux.exccon)
......
......@@ -40,6 +40,7 @@ end
function s.tgop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONFIRM)
local tc=Duel.SelectMatchingCard(tp,s.filter,tp,LOCATION_EXTRA,0,1,1,nil,tp):GetFirst()
if not tc then return end
Duel.ConfirmCards(1-tp,tc)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local sc=Duel.SelectMatchingCard(tp,s.sfilter,tp,LOCATION_DECK,0,1,1,nil,tc):GetFirst()
......@@ -55,7 +56,7 @@ function s.tgop(e,tp,eg,ep,ev,re,r,rp)
Duel.RegisterEffect(e1,tp)
local e2=e1:Clone()
e2:SetCode(EFFECT_CANNOT_ACTIVATE)
e2:SetTarget(s.alimit)
e2:SetValue(s.alimit)
Duel.RegisterEffect(e2,tp)
end
end
......
......@@ -71,4 +71,4 @@ function c35026117.tfop(e,tp,eg,ep,ev,re,r,rp)
Duel.Destroy(tg,REASON_EFFECT)
end
end
end
\ No newline at end of file
end
......@@ -35,6 +35,8 @@ function c36730805.activate(e,tp,eg,ep,ev,re,r,rp)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_CHAIN_END)
e2:SetOperation(c36730805.limitop)
e2:SetCountLimit(1)
e2:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e2,tp)
end
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)
......
......@@ -64,8 +64,8 @@ function c37343995.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
end
function c37343995.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) or Duel.IsPlayerAffectedByEffect(tp,59822133) then return end
if Duel.SpecialSummonStep(c,0,tp,tp,false,false,POS_FACEUP) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then
if not c:IsRelateToEffect(e) then return end
if Duel.SpecialSummonStep(c,0,tp,tp,false,false,POS_FACEUP) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and not Duel.IsPlayerAffectedByEffect(tp,59822133) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c37343995.spfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp)
if g:GetCount()>0 then
......
......@@ -23,6 +23,7 @@ end
function c38041940.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c38041940.spfilter(chkc,e,tp) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.GetLocationCount(1-tp,LOCATION_MZONE)>0
and not Duel.IsPlayerAffectedByEffect(tp,59822133)
and Duel.IsExistingTarget(c38041940.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp)
and Duel.IsPlayerCanSpecialSummonMonster(tp,38041941,0,TYPES_TOKEN_MONSTER,0,0,1,RACE_PLANT,ATTRIBUTE_EARTH,POS_FACEUP_DEFENSE,1-tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
......@@ -34,6 +35,7 @@ function c38041940.operation(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and tc:IsRace(RACE_PLANT) and Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP) then
if Duel.GetLocationCount(1-tp,LOCATION_MZONE)>0
and not Duel.IsPlayerAffectedByEffect(tp,59822133)
and Duel.IsPlayerCanSpecialSummonMonster(tp,38041941,0,TYPES_TOKEN_MONSTER,0,0,1,RACE_PLANT,ATTRIBUTE_EARTH,POS_FACEUP_DEFENSE,1-tp) then
local token=Duel.CreateToken(tp,38041941)
Duel.SpecialSummonStep(token,0,tp,1-tp,false,false,POS_FACEUP_DEFENSE)
......
......@@ -26,15 +26,21 @@ function c38273745.tg1(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
return chkc:IsControler(1-tp) and chkc:IsLocation(LOCATION_GRAVE) and chkc:IsAbleToRemove()
end
end
local b1=Duel.IsExistingTarget(Card.IsAbleToHand,tp,0,LOCATION_ONFIELD,1,nil)
local b2=Duel.GetFieldGroupCount(1-tp,LOCATION_HAND,0)~=0
local b3=Duel.IsExistingTarget(Card.IsAbleToRemove,tp,0,LOCATION_GRAVE,1,nil)
local c=e:GetHandler()
local flag=c:GetFlagEffectLabel(38273745) or 0
local b1=(flag&2==0) and Duel.IsExistingTarget(Card.IsAbleToHand,tp,0,LOCATION_ONFIELD,1,nil)
local b2=(flag&4==0) and Duel.GetFieldGroupCount(1-tp,LOCATION_HAND,0)~=0
local b3=(flag&8==0) and Duel.IsExistingTarget(Card.IsAbleToRemove,tp,0,LOCATION_GRAVE,1,nil)
if chk==0 then return b1 or b2 or b3 end
local op=aux.SelectFromOptions(tp,
{b1,aux.Stringid(38273745,1)},
{b2,aux.Stringid(38273745,2)},
{b3,aux.Stringid(38273745,3)})
e:SetLabel(op)
if flag==0 then
c:RegisterFlagEffect(38273745,RESET_EVENT+RESETS_STANDARD,0,1)
end
c:SetFlagEffectLabel(38273745,flag|(1<<op))
if op==1 then
e:SetCategory(CATEGORY_TOHAND)
e:SetProperty(EFFECT_FLAG_CARD_TARGET)
......
......@@ -34,23 +34,8 @@ function c38495396.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE+LOCATION_GRAVE) and c38495396.thfilter(chkc) end
if chk==0 then return e:GetHandler():GetFlagEffect(38495396)==0
and Duel.IsExistingTarget(c38495396.thfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,LOCATION_MZONE+LOCATION_GRAVE,1,nil) end
local b1=Duel.IsExistingTarget(c38495396.thfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil)
local b2=Duel.IsExistingTarget(c38495396.thfilter,tp,LOCATION_GRAVE,LOCATION_GRAVE,1,nil)
local op=0
if b1 and b2 then
op=Duel.SelectOption(tp,aux.Stringid(38495396,2),aux.Stringid(38495396,3))
else
op=2
end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND)
local g=nil
if op==0 then
g=Duel.SelectTarget(tp,c38495396.thfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
elseif op==1 then
g=Duel.SelectTarget(tp,c38495396.thfilter,tp,LOCATION_GRAVE,LOCATION_GRAVE,1,1,nil)
else
g=Duel.SelectTarget(tp,c38495396.thfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,LOCATION_MZONE+LOCATION_GRAVE,1,1,nil)
end
local g=aux.SelectTargetFromFieldFirst(tp,c38495396.thfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,LOCATION_MZONE+LOCATION_GRAVE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0)
end
function c38495396.thop(e,tp,eg,ep,ev,re,r,rp)
......
......@@ -155,4 +155,4 @@ end
function s.resetop(e,tp,eg,ep,ev,re,r,rp)
Duel.ResetFlagEffect(tp,id)
e:Reset()
end
\ No newline at end of file
end
......@@ -52,7 +52,7 @@ function c39185163.disrmop(e,tp,eg,ep,ev,re,r,rp)
Duel.RegisterFlagEffect(tp,39185163,RESET_PHASE+PHASE_END,0,1)
else
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,c39185163.filter,tp,LOCATION_MZONE+LOCATION_GRAVE,LOCATION_MZONE+LOCATION_GRAVE,1,1,nil)
local g=aux.SelectCardFromFieldFirst(tp,c39185163.filter,tp,LOCATION_MZONE+LOCATION_GRAVE,LOCATION_MZONE+LOCATION_GRAVE,1,1,nil)
Duel.Remove(g,POS_FACEUP,REASON_EFFECT)
Duel.RegisterFlagEffect(tp,39185164,RESET_PHASE+PHASE_END,0,1)
end
......
......@@ -148,4 +148,4 @@ function c40785230.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP)
end
end
end
\ No newline at end of file
end
......@@ -17,7 +17,7 @@ function c41329458.initial_effect(c)
e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e2:SetRange(LOCATION_MZONE)
e2:SetCode(EFFECT_INDESTRUCTABLE_BATTLE)
e2:SetCondition(c41329458.indcon)
e2:SetCondition(aux.tkfcon)
e2:SetValue(1)
c:RegisterEffect(e2)
local e3=e2:Clone()
......@@ -35,9 +35,6 @@ function c41329458.initial_effect(c)
e4:SetOperation(c41329458.spop2)
c:RegisterEffect(e4)
end
function c41329458.indcon(e)
return Duel.IsExistingMatchingCard(Card.IsType,e:GetHandlerPlayer(),LOCATION_MZONE,0,1,nil,TYPE_TOKEN)
end
function c41329458.rfilter(c,tp)
return c:IsSetCard(0x101b) and (c:IsControler(tp) or c:IsFaceup())
end
......
......@@ -57,6 +57,16 @@ function s.splim(e,c)
return c:GetRace()~=RACE_THUNDER
end
function s.operation(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and tc:IsFaceup() and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sc=Duel.SelectMatchingCard(tp,s.filter,tp,LOCATION_DECK,0,1,1,nil,e,tp,tc:GetCode()):GetFirst()
if sc and Duel.SpecialSummon(sc,0,tp,tp,false,false,POS_FACEUP)>0 and aux.nzatk(sc) then
Duel.BreakEffect()
local lp=Duel.GetLP(tp)
Duel.SetLP(tp,lp-sc:GetAttack())
end
end
local c=e:GetHandler()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
......@@ -66,13 +76,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp)
e1:SetTarget(s.splim)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
local tc=Duel.GetFirstTarget()
if not tc:IsRelateToEffect(e) or tc:IsFacedown() or Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sc=Duel.SelectMatchingCard(tp,s.filter,tp,LOCATION_DECK,0,1,1,nil,e,tp,tc:GetCode()):GetFirst()
if sc and Duel.SpecialSummon(sc,0,tp,tp,false,false,POS_FACEUP)>0 and aux.nzatk(sc) then
Duel.BreakEffect()
local lp=Duel.GetLP(tp)
Duel.SetLP(tp,lp-sc:GetAttack())
end
end
......@@ -69,7 +69,7 @@ function c42741437.rmtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE+LOCATION_ONFIELD) and chkc:IsControler(1-tp) and chkc:IsAbleToRemove() end
if chk==0 then return Duel.IsExistingTarget(Card.IsAbleToRemove,tp,0,LOCATION_GRAVE+LOCATION_ONFIELD,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectTarget(tp,Card.IsAbleToRemove,tp,0,LOCATION_GRAVE+LOCATION_ONFIELD,1,1,nil)
local g=aux.SelectTargetFromFieldFirst(tp,Card.IsAbleToRemove,tp,0,LOCATION_GRAVE+LOCATION_ONFIELD,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,1,0,0)
end
function c42741437.rmop(e,tp,eg,ep,ev,re,r,rp)
......
......@@ -74,4 +74,4 @@ function c42822433.spop(e,tp,eg,ep,ev,re,r,rp)
end
function c42822433.atktg(e,c)
return not c:IsType(TYPE_XYZ)
end
\ No newline at end of file
end
......@@ -56,4 +56,4 @@ function c43944080.distg(e,tp,eg,ep,ev,re,r,rp,chk)
end
function c43944080.disop(e,tp,eg,ep,ev,re,r,rp)
Duel.NegateActivation(ev)
end
\ No newline at end of file
end
......@@ -14,7 +14,7 @@ function c44026393.initial_effect(c)
e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e2:SetRange(LOCATION_MZONE)
e2:SetCode(EFFECT_INDESTRUCTABLE_BATTLE)
e2:SetCondition(c44026393.indcon)
e2:SetCondition(aux.tkfcon)
e2:SetValue(1)
c:RegisterEffect(e2)
local e3=e2:Clone()
......@@ -35,9 +35,6 @@ function c44026393.lvval(e,c)
local tp=c:GetControler()
return Duel.GetMatchingGroup(Card.IsCode,tp,LOCATION_MZONE,0,nil,31533705):GetSum(Card.GetLevel)
end
function c44026393.indcon(e)
return Duel.IsExistingMatchingCard(Card.IsType,e:GetHandlerPlayer(),LOCATION_MZONE,0,1,nil,TYPE_TOKEN)
end
function c44026393.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,nil) end
Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST+REASON_DISCARD)
......
......@@ -14,7 +14,7 @@ function c4417407.initial_effect(c)
e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e2:SetRange(LOCATION_MZONE)
e2:SetCode(EFFECT_INDESTRUCTABLE_BATTLE)
e2:SetCondition(c4417407.indcon)
e2:SetCondition(aux.tkfcon)
e2:SetValue(1)
c:RegisterEffect(e2)
local e3=e2:Clone()
......@@ -48,9 +48,6 @@ function c4417407.lvval(e,c)
local tp=c:GetControler()
return Duel.GetMatchingGroup(Card.IsCode,tp,LOCATION_MZONE,0,nil,31533705):GetSum(Card.GetLevel)
end
function c4417407.indcon(e)
return Duel.IsExistingMatchingCard(Card.IsType,e:GetHandlerPlayer(),LOCATION_MZONE,0,1,nil,TYPE_TOKEN)
end
function c4417407.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,1,0,0)
......
......@@ -62,4 +62,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1)
end
end
\ No newline at end of file
end
......@@ -68,4 +68,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp)
if #g>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
end
\ No newline at end of file
end
......@@ -87,4 +87,4 @@ function s.damval(e,re,val,r,rp,rc)
if r&REASON_EFFECT==REASON_EFFECT then
return val*2
else return val end
end
\ No newline at end of file
end
......@@ -48,7 +48,7 @@ function s.mvtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE+LOCATION_MZONE) and s.filter(chkc,tp) end
if chk==0 then return Duel.IsExistingTarget(s.filter,tp,LOCATION_GRAVE+LOCATION_MZONE,LOCATION_GRAVE+LOCATION_MZONE,1,nil,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
local g=Duel.SelectTarget(tp,s.filter,tp,LOCATION_GRAVE+LOCATION_MZONE,LOCATION_GRAVE+LOCATION_MZONE,1,1,nil,tp)
local g=aux.SelectTargetFromFieldFirst(tp,s.filter,tp,LOCATION_GRAVE+LOCATION_MZONE,LOCATION_GRAVE+LOCATION_MZONE,1,1,nil,tp)
if g:GetFirst():IsLocation(LOCATION_GRAVE) then
Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,g,1,0,0)
end
......
......@@ -75,4 +75,4 @@ function c51779204.effcon(e)
end
function c51779204.damcon(e)
return e:GetHandler():GetBattleTarget()~=nil
end
\ No newline at end of file
end
......@@ -45,7 +45,7 @@ end
function c53485634.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS):Filter(c53485634.filter,nil,e,tp)
if not Duel.IsPlayerAffectedByEffect(tp,59822133) and c:IsRelateToEffect(e) then
if c:IsRelateToEffect(e) then
if Duel.SpecialSummonStep(c,0,tp,tp,false,false,POS_FACEUP_DEFENSE) then
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
if ft>0 and g:GetCount()>0 and not Duel.IsPlayerAffectedByEffect(tp,59822133) then
......
......@@ -71,4 +71,4 @@ function c53754104.posop(e,tp,eg,ep,ev,re,r,rp)
if tc:IsRelateToEffect(e) then
Duel.ChangePosition(tc,POS_FACEUP_DEFENSE,POS_FACEUP_ATTACK,POS_FACEUP_ATTACK,POS_FACEUP_ATTACK)
end
end
\ No newline at end of file
end
......@@ -50,4 +50,4 @@ function c54594017.desop(e,tp,eg,ep,ev,re,r,rp)
if tc:IsRelateToEffect(e) then
Duel.Destroy(tc,REASON_EFFECT)
end
end
\ No newline at end of file
end
......@@ -86,4 +86,4 @@ function c54851325.desop(e,tp,eg,ep,ev,re,r,rp)
Duel.HintSelection(g)
Duel.Destroy(g,REASON_EFFECT)
end
end
\ No newline at end of file
end
......@@ -23,7 +23,7 @@ function c55501446.spcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsPreviousLocation(LOCATION_HAND)
end
function c55501446.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and e:GetHandler():IsRelateToEffect(e)
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)
end
......
--VS プルトンHG
function c55688914.initial_effect(c)
--spsummon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(55688914,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,55688914)
e1:SetHintTiming(0,TIMING_END_PHASE)
e1:SetCondition(c55688914.spcon)
e1:SetTarget(c55688914.sptg)
e1:SetOperation(c55688914.spop)
c:RegisterEffect(e1)
--show fire for def up
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(55688914,1))
e2:SetCategory(CATEGORY_DEFCHANGE)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,55688915)
e2:SetHintTiming(TIMING_DAMAGE_STEP)
e2:SetCondition(aux.dscon)
e2:SetCost(c55688914.defcost)
e2:SetTarget(c55688914.deftg)
e2:SetOperation(c55688914.defop)
c:RegisterEffect(e2)
--show earth and dark for atk up
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(55688914,2))
e3:SetCategory(CATEGORY_ATKCHANGE)
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetCode(EVENT_FREE_CHAIN)
e3:SetProperty(EFFECT_FLAG_DAMAGE_STEP)
e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1,55688915)
e3:SetHintTiming(TIMING_DAMAGE_STEP)
e3:SetCondition(aux.dscon)
e3:SetCost(c55688914.atkcost)
e3:SetTarget(c55688914.atktg)
e3:SetOperation(c55688914.atkop)
c:RegisterEffect(e3)
end
function c55688914.spcfilter1(c)
return c:GetSequence()<5
end
function c55688914.spcfilter2(c)
return c:GetSequence()<5 and c:IsSetCard(0x195) and c:IsFaceup()
end
function c55688914.spcon(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetTurnPlayer()~=1-tp then return false end
local ct1=Duel.GetMatchingGroupCount(c55688914.spcfilter1,tp,LOCATION_MZONE,0,nil)
local ct2=Duel.GetMatchingGroupCount(c55688914.spcfilter2,tp,LOCATION_MZONE,0,nil)
return ct1==0 or ct1==ct2
end
function c55688914.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
and Duel.GetFlagEffect(tp,55688914)==0 end
Duel.RegisterFlagEffect(tp,55688914,RESET_CHAIN,0,1)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,0,0)
end
function c55688914.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToChain() then
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
end
end
function c55688914.defcfilter(c)
return c:IsAttribute(ATTRIBUTE_FIRE) and not c:IsPublic()
end
function c55688914.defcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c55688914.defcfilter,tp,LOCATION_HAND,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONFIRM)
local g=Duel.SelectMatchingCard(tp,c55688914.defcfilter,tp,LOCATION_HAND,0,1,1,nil)
Duel.ConfirmCards(1-tp,g)
Duel.RaiseEvent(g,EVENT_CUSTOM+9091064,e,REASON_COST,tp,tp,0)
Duel.ShuffleHand(tp)
end
function c55688914.deftg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetFlagEffect(tp,55688914)==0 end
Duel.RegisterFlagEffect(tp,55688914,RESET_CHAIN,0,1)
end
function c55688914.defop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToChain() then return end
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_DEFENSE)
e1:SetValue(3000)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_DISABLE+RESET_PHASE+PHASE_END)
c:RegisterEffect(e1)
end
function c55688914.atkcfilter(c)
return c:IsAttribute(ATTRIBUTE_EARTH+ATTRIBUTE_DARK) and not c:IsPublic()
end
function c55688914.atkcost(e,tp,eg,ep,ev,re,r,rp,chk)
local g=Duel.GetMatchingGroup(c55688914.atkcfilter,tp,LOCATION_HAND,0,nil)
if chk==0 then return g:CheckSubGroup(aux.gfcheck,2,2,Card.IsAttribute,ATTRIBUTE_EARTH,ATTRIBUTE_DARK) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONFIRM)
local sg=g:SelectSubGroup(tp,aux.gfcheck,false,2,2,Card.IsAttribute,ATTRIBUTE_EARTH,ATTRIBUTE_DARK)
Duel.ConfirmCards(1-tp,sg)
Duel.RaiseEvent(sg,EVENT_CUSTOM+9091064,e,REASON_COST,tp,tp,0)
Duel.ShuffleHand(tp)
end
function c55688914.atktg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetFlagEffect(tp,55688914)==0 end
Duel.RegisterFlagEffect(tp,55688914,RESET_CHAIN,0,1)
end
function c55688914.atkop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToChain() then return end
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetValue(3000)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_DISABLE+RESET_PHASE+PHASE_END)
c:RegisterEffect(e1)
end
--VS プルトンHG
function c55688914.initial_effect(c)
--spsummon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(55688914,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,55688914)
e1:SetHintTiming(0,TIMING_END_PHASE)
e1:SetCondition(c55688914.spcon)
e1:SetTarget(c55688914.sptg)
e1:SetOperation(c55688914.spop)
c:RegisterEffect(e1)
--show fire for def up
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(55688914,1))
e2:SetCategory(CATEGORY_DEFCHANGE)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,55688915)
e2:SetHintTiming(TIMING_DAMAGE_STEP)
e2:SetCondition(aux.dscon)
e2:SetCost(c55688914.defcost)
e2:SetTarget(c55688914.deftg)
e2:SetOperation(c55688914.defop)
c:RegisterEffect(e2)
--show earth and dark for atk up
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(55688914,2))
e3:SetCategory(CATEGORY_ATKCHANGE)
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetCode(EVENT_FREE_CHAIN)
e3:SetProperty(EFFECT_FLAG_DAMAGE_STEP)
e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1,55688915)
e3:SetHintTiming(TIMING_DAMAGE_STEP)
e3:SetCondition(aux.dscon)
e3:SetCost(c55688914.atkcost)
e3:SetTarget(c55688914.atktg)
e3:SetOperation(c55688914.atkop)
c:RegisterEffect(e3)
end
function c55688914.spcfilter1(c)
return c:GetSequence()<5
end
function c55688914.spcfilter2(c)
return c:GetSequence()<5 and c:IsSetCard(0x195) and c:IsFaceup()
end
function c55688914.spcon(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetTurnPlayer()~=1-tp then return false end
local ct1=Duel.GetMatchingGroupCount(c55688914.spcfilter1,tp,LOCATION_MZONE,0,nil)
local ct2=Duel.GetMatchingGroupCount(c55688914.spcfilter2,tp,LOCATION_MZONE,0,nil)
return ct1==0 or ct1==ct2
end
function c55688914.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
and Duel.GetFlagEffect(tp,55688914)==0 end
Duel.RegisterFlagEffect(tp,55688914,RESET_CHAIN,0,1)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,0,0)
end
function c55688914.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToChain() then
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
end
end
function c55688914.defcfilter(c)
return c:IsAttribute(ATTRIBUTE_FIRE) and not c:IsPublic()
end
function c55688914.defcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c55688914.defcfilter,tp,LOCATION_HAND,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONFIRM)
local g=Duel.SelectMatchingCard(tp,c55688914.defcfilter,tp,LOCATION_HAND,0,1,1,nil)
Duel.ConfirmCards(1-tp,g)
Duel.RaiseEvent(g,EVENT_CUSTOM+9091064,e,REASON_COST,tp,tp,0)
Duel.ShuffleHand(tp)
end
function c55688914.deftg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetFlagEffect(tp,55688914)==0 end
Duel.RegisterFlagEffect(tp,55688914,RESET_CHAIN,0,1)
end
function c55688914.defop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToChain() then return end
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_DEFENSE)
e1:SetValue(3000)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_DISABLE+RESET_PHASE+PHASE_END)
c:RegisterEffect(e1)
end
function c55688914.atkcfilter(c)
return c:IsAttribute(ATTRIBUTE_EARTH+ATTRIBUTE_DARK) and not c:IsPublic()
end
function c55688914.atkcost(e,tp,eg,ep,ev,re,r,rp,chk)
local g=Duel.GetMatchingGroup(c55688914.atkcfilter,tp,LOCATION_HAND,0,nil)
if chk==0 then return g:CheckSubGroup(aux.gfcheck,2,2,Card.IsAttribute,ATTRIBUTE_EARTH,ATTRIBUTE_DARK) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONFIRM)
local sg=g:SelectSubGroup(tp,aux.gfcheck,false,2,2,Card.IsAttribute,ATTRIBUTE_EARTH,ATTRIBUTE_DARK)
Duel.ConfirmCards(1-tp,sg)
Duel.RaiseEvent(sg,EVENT_CUSTOM+9091064,e,REASON_COST,tp,tp,0)
Duel.ShuffleHand(tp)
end
function c55688914.atktg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetFlagEffect(tp,55688914)==0 end
Duel.RegisterFlagEffect(tp,55688914,RESET_CHAIN,0,1)
end
function c55688914.atkop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToChain() then return end
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetValue(3000)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_DISABLE+RESET_PHASE+PHASE_END)
c:RegisterEffect(e1)
end
......@@ -70,4 +70,4 @@ function c56510115.atktg(e,c)
end
function c56510115.atkval(e,c)
return c:GetCurrentScale()*300
end
\ No newline at end of file
end
......@@ -94,7 +94,7 @@ function c56518311.rmtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE+LOCATION_GRAVE) and chkc:IsControler(1-tp) and c56518311.rmfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c56518311.rmfilter,tp,0,LOCATION_MZONE+LOCATION_GRAVE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectTarget(tp,c56518311.rmfilter,tp,0,LOCATION_MZONE+LOCATION_GRAVE,1,1,nil)
local g=aux.SelectTargetFromFieldFirst(tp,c56518311.rmfilter,tp,0,LOCATION_MZONE+LOCATION_GRAVE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,1,0,0)
end
function c56518311.rmop(e,tp,eg,ep,ev,re,r,rp)
......
......@@ -75,4 +75,4 @@ function c56727340.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
end
\ No newline at end of file
end
......@@ -78,4 +78,4 @@ function s.spdpop(e,tp,eg,ep,ev,re,r,rp)
Duel.BreakEffect()
Duel.Draw(tp,1,REASON_EFFECT)
end
end
\ No newline at end of file
end
......@@ -36,7 +36,7 @@ function c57416183.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SELF)
local g1=Duel.SelectTarget(tp,c57416183.cfilter,tp,LOCATION_MZONE,0,1,1,nil)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_OPPO)
local g2=Duel.SelectTarget(tp,Card.IsAbleToHand,tp,0,LOCATION_ONFIELD+LOCATION_GRAVE,1,1,nil)
local g2=aux.SelectTargetFromFieldFirst(tp,Card.IsAbleToHand,tp,0,LOCATION_ONFIELD+LOCATION_GRAVE,1,1,nil)
g1:Merge(g2)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g1,g1:GetCount(),0,0)
end
......
......@@ -3,7 +3,7 @@ function c57769391.initial_effect(c)
--mill
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(57769391,0))
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_DECKDES)
e1:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND+CATEGORY_DECKDES)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1,57769391)
......
......@@ -45,14 +45,14 @@ function s.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
end
function s.desfilter(c,tp,seq)
local sseq=c:GetSequence()
if c:IsControler(tp) then
return sseq==5 and seq==3 or sseq==6 and seq==1
if c:IsControler(tp) and c:IsLocation(LOCATION_MZONE) then
return sseq==5 and seq==3 or sseq==6 and seq==1 or sseq==3 and seq==5 or sseq==1 and seq==6
end
if c:IsLocation(LOCATION_SZONE) then
if c:IsControler(tp) and c:IsLocation(LOCATION_SZONE) then
return sseq<5 and sseq==seq
end
if sseq<5 then
return math.abs(sseq-seq)==1
return math.abs(sseq-seq)==1 or sseq==1 and seq==5 or sseq==3 and seq==6
end
if sseq>=5 then
return sseq==5 and seq==1 or sseq==6 and seq==3
......@@ -60,8 +60,8 @@ function s.desfilter(c,tp,seq)
end
function s.desop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
local cg=Duel.GetMatchingGroup(s.desfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,tc,tp,tc:GetSequence())
if tc:IsRelateToEffect(e) and tc:IsType(TYPE_MONSTER) then
local cg=Duel.GetMatchingGroup(s.desfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,tc,1-tc:GetControler(),tc:GetSequence())
if Duel.Destroy(tc,REASON_EFFECT)~=0 and Duel.GetLP(tp)<Duel.GetLP(1-tp) and #cg>0
and Duel.SelectYesNo(tp,aux.Stringid(id,1)) then
Duel.BreakEffect()
......
......@@ -85,4 +85,4 @@ function c60023855.spop(e,tp,eg,ep,ev,re,r,rp)
if tc:IsRelateToEffect(e) then
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)
end
end
\ No newline at end of file
end
......@@ -40,7 +40,7 @@ function c601193.tdtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_ONFIELD+LOCATION_GRAVE) and chkc:IsControler(1-tp) and chkc:IsAbleToDeck() end
if chk==0 then return Duel.IsExistingTarget(Card.IsAbleToDeck,tp,0,LOCATION_ONFIELD+LOCATION_GRAVE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=Duel.SelectTarget(tp,Card.IsAbleToDeck,tp,0,LOCATION_ONFIELD+LOCATION_GRAVE,1,1,nil)
local g=aux.SelectTargetFromFieldFirst(tp,Card.IsAbleToDeck,tp,0,LOCATION_ONFIELD+LOCATION_GRAVE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_TODECK,g,1,0,0)
end
function c601193.tdop(e,tp,eg,ep,ev,re,r,rp)
......
......@@ -108,7 +108,7 @@ function c60168186.rmtg(e,tp,eg,ep,ev,re,r,rp,chk)
end
function c60168186.rmop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,Card.IsAbleToRemove,tp,LOCATION_ONFIELD+LOCATION_GRAVE,LOCATION_ONFIELD+LOCATION_GRAVE,1,1,nil)
local g=aux.SelectCardFromFieldFirst(tp,Card.IsAbleToRemove,tp,LOCATION_ONFIELD+LOCATION_GRAVE,LOCATION_ONFIELD+LOCATION_GRAVE,1,1,nil)
if g:GetCount()>0 then
Duel.Remove(g,POS_FACEUP,REASON_EFFECT)
end
......
......@@ -31,7 +31,7 @@ function c60681103.rmtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE+LOCATION_GRAVE) and chkc:IsControler(1-tp) and c60681103.rmfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c60681103.rmfilter,tp,0,LOCATION_MZONE+LOCATION_GRAVE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectTarget(tp,c60681103.rmfilter,tp,0,LOCATION_MZONE+LOCATION_GRAVE,1,1,nil)
local g=aux.SelectTargetFromFieldFirst(tp,c60681103.rmfilter,tp,0,LOCATION_MZONE+LOCATION_GRAVE,1,1,nil)
local tc=g:GetFirst()
if tc:IsLocation(LOCATION_GRAVE) then
Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,1,1-tp,LOCATION_GRAVE)
......
......@@ -39,7 +39,7 @@ function c65187687.rmtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE+LOCATION_GRAVE) and chkc:IsControler(1-tp) and c65187687.rmfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c65187687.rmfilter,tp,0,LOCATION_MZONE+LOCATION_GRAVE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectTarget(tp,c65187687.rmfilter,tp,0,LOCATION_GRAVE+LOCATION_MZONE,1,1,nil)
local g=aux.SelectTargetFromFieldFirst(tp,c65187687.rmfilter,tp,0,LOCATION_GRAVE+LOCATION_MZONE,1,1,nil)
if g:GetFirst():IsLocation(LOCATION_GRAVE) then
Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,1,1-tp,LOCATION_GRAVE)
else
......
......@@ -100,4 +100,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp)
local xyz=xyzg:Select(tp,1,1,nil):GetFirst()
Duel.XyzSummon(tp,xyz,g,1,6)
end
end
\ No newline at end of file
end
......@@ -124,4 +124,4 @@ function c66150724.disop(e,tp,eg,ep,ev,re,r,rp)
if re:GetActiveType()==TYPE_PENDULUM+TYPE_SPELL and p==tp and bit.band(loc,LOCATION_PZONE)~=0 then
Duel.NegateEffect(ev)
end
end
\ No newline at end of file
end
......@@ -14,7 +14,7 @@ function c66200210.initial_effect(c)
e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e2:SetRange(LOCATION_MZONE)
e2:SetCode(EFFECT_INDESTRUCTABLE_BATTLE)
e2:SetCondition(c66200210.indcon)
e2:SetCondition(aux.tkfcon)
e2:SetValue(1)
c:RegisterEffect(e2)
local e3=e2:Clone()
......@@ -46,9 +46,6 @@ function c66200210.lvval(e,c)
local tp=c:GetControler()
return Duel.GetMatchingGroup(Card.IsCode,tp,LOCATION_MZONE,0,nil,31533705):GetSum(Card.GetLevel)
end
function c66200210.indcon(e)
return Duel.IsExistingMatchingCard(Card.IsType,e:GetHandlerPlayer(),LOCATION_MZONE,0,1,nil,TYPE_TOKEN)
end
function c66200210.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,2,0,0)
......
--VS パンテラ
function c66401502.initial_effect(c)
--spsummon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(66401502,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,66401502)
e1:SetCondition(c66401502.spcon)
e1:SetTarget(c66401502.sptg)
e1:SetOperation(c66401502.spop)
c:RegisterEffect(e1)
--show earth for indes
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(66401502,1))
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,66401503)
e2:SetCost(c66401502.indescost)
e2:SetCondition(aux.bpcon)
e2:SetTarget(c66401502.indestg)
e2:SetOperation(c66401502.indesop)
c:RegisterEffect(e2)
--show earth and fire for destroy
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(66401502,2))
e3:SetCategory(CATEGORY_DESTROY)
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetCode(EVENT_FREE_CHAIN)
e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1,66401503)
e3:SetHintTiming(0,TIMING_EQUIP+TIMING_END_PHASE)
e3:SetCost(c66401502.descost)
e3:SetTarget(c66401502.destg)
e3:SetOperation(c66401502.desop)
c:RegisterEffect(e3)
end
function c66401502.spcfilter(c)
return c:GetSequence()<5
end
function c66401502.spcon(e,tp,eg,ep,ev,re,r,rp)
return not Duel.IsExistingMatchingCard(c66401502.spcfilter,tp,LOCATION_MZONE,0,1,nil)
end
function c66401502.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
and Duel.GetFlagEffect(tp,66401502)==0 end
Duel.RegisterFlagEffect(tp,66401502,RESET_CHAIN,0,1)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,0,0)
end
function c66401502.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToChain() then
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
end
end
function c66401502.indescfilter(c)
return c:IsAttribute(ATTRIBUTE_EARTH) and not c:IsPublic()
end
function c66401502.indescost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c66401502.indescfilter,tp,LOCATION_HAND,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONFIRM)
local g=Duel.SelectMatchingCard(tp,c66401502.indescfilter,tp,LOCATION_HAND,0,1,1,nil)
Duel.ConfirmCards(1-tp,g)
Duel.RaiseEvent(g,EVENT_CUSTOM+9091064,e,REASON_COST,tp,tp,0)
Duel.ShuffleHand(tp)
end
function c66401502.indestg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetFlagEffect(tp,66401502)==0 end
Duel.RegisterFlagEffect(tp,66401502,RESET_CHAIN,0,1)
end
function c66401502.indesop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToChain() then return end
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_INDESTRUCTABLE_BATTLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetValue(1)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,1)
c:RegisterEffect(e1)
end
function c66401502.descfilter(c)
return c:IsAttribute(ATTRIBUTE_EARTH+ATTRIBUTE_FIRE) and not c:IsPublic()
end
function c66401502.descost(e,tp,eg,ep,ev,re,r,rp,chk)
local g=Duel.GetMatchingGroup(c66401502.descfilter,tp,LOCATION_HAND,0,nil)
if chk==0 then return g:CheckSubGroup(aux.gfcheck,2,2,Card.IsAttribute,ATTRIBUTE_EARTH,ATTRIBUTE_FIRE) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONFIRM)
local sg=g:SelectSubGroup(tp,aux.gfcheck,false,2,2,Card.IsAttribute,ATTRIBUTE_EARTH,ATTRIBUTE_FIRE)
Duel.ConfirmCards(1-tp,sg)
Duel.RaiseEvent(sg,EVENT_CUSTOM+9091064,e,REASON_COST,tp,tp,0)
Duel.ShuffleHand(tp)
end
function c66401502.destg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
local g=c:GetColumnGroup():Filter(Card.IsType,nil,TYPE_SPELL+TYPE_TRAP)
if chk==0 then return #g>0 and Duel.GetFlagEffect(tp,66401502)==0 end
Duel.RegisterFlagEffect(tp,66401502,RESET_CHAIN,0,1)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,#g,0,0)
end
function c66401502.desop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToChain() then return end
local g=c:GetColumnGroup():Filter(Card.IsType,nil,TYPE_SPELL+TYPE_TRAP)
Duel.Destroy(g,REASON_EFFECT)
end
--VS パンテラ
function c66401502.initial_effect(c)
--spsummon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(66401502,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,66401502)
e1:SetCondition(c66401502.spcon)
e1:SetTarget(c66401502.sptg)
e1:SetOperation(c66401502.spop)
c:RegisterEffect(e1)
--show earth for indes
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(66401502,1))
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,66401503)
e2:SetCost(c66401502.indescost)
e2:SetCondition(aux.bpcon)
e2:SetTarget(c66401502.indestg)
e2:SetOperation(c66401502.indesop)
c:RegisterEffect(e2)
--show earth and fire for destroy
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(66401502,2))
e3:SetCategory(CATEGORY_DESTROY)
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetCode(EVENT_FREE_CHAIN)
e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1,66401503)
e3:SetHintTiming(0,TIMING_EQUIP+TIMING_END_PHASE)
e3:SetCost(c66401502.descost)
e3:SetTarget(c66401502.destg)
e3:SetOperation(c66401502.desop)
c:RegisterEffect(e3)
end
function c66401502.spcfilter(c)
return c:GetSequence()<5
end
function c66401502.spcon(e,tp,eg,ep,ev,re,r,rp)
return not Duel.IsExistingMatchingCard(c66401502.spcfilter,tp,LOCATION_MZONE,0,1,nil)
end
function c66401502.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
and Duel.GetFlagEffect(tp,66401502)==0 end
Duel.RegisterFlagEffect(tp,66401502,RESET_CHAIN,0,1)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,0,0)
end
function c66401502.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToChain() then
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
end
end
function c66401502.indescfilter(c)
return c:IsAttribute(ATTRIBUTE_EARTH) and not c:IsPublic()
end
function c66401502.indescost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c66401502.indescfilter,tp,LOCATION_HAND,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONFIRM)
local g=Duel.SelectMatchingCard(tp,c66401502.indescfilter,tp,LOCATION_HAND,0,1,1,nil)
Duel.ConfirmCards(1-tp,g)
Duel.RaiseEvent(g,EVENT_CUSTOM+9091064,e,REASON_COST,tp,tp,0)
Duel.ShuffleHand(tp)
end
function c66401502.indestg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetFlagEffect(tp,66401502)==0 end
Duel.RegisterFlagEffect(tp,66401502,RESET_CHAIN,0,1)
end
function c66401502.indesop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToChain() then return end
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_INDESTRUCTABLE_BATTLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetValue(1)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,1)
c:RegisterEffect(e1)
end
function c66401502.descfilter(c)
return c:IsAttribute(ATTRIBUTE_EARTH+ATTRIBUTE_FIRE) and not c:IsPublic()
end
function c66401502.descost(e,tp,eg,ep,ev,re,r,rp,chk)
local g=Duel.GetMatchingGroup(c66401502.descfilter,tp,LOCATION_HAND,0,nil)
if chk==0 then return g:CheckSubGroup(aux.gfcheck,2,2,Card.IsAttribute,ATTRIBUTE_EARTH,ATTRIBUTE_FIRE) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONFIRM)
local sg=g:SelectSubGroup(tp,aux.gfcheck,false,2,2,Card.IsAttribute,ATTRIBUTE_EARTH,ATTRIBUTE_FIRE)
Duel.ConfirmCards(1-tp,sg)
Duel.RaiseEvent(sg,EVENT_CUSTOM+9091064,e,REASON_COST,tp,tp,0)
Duel.ShuffleHand(tp)
end
function c66401502.destg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
local g=c:GetColumnGroup():Filter(Card.IsType,nil,TYPE_SPELL+TYPE_TRAP)
if chk==0 then return #g>0 and Duel.GetFlagEffect(tp,66401502)==0 end
Duel.RegisterFlagEffect(tp,66401502,RESET_CHAIN,0,1)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,#g,0,0)
end
function c66401502.desop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToChain() then return end
local g=c:GetColumnGroup():Filter(Card.IsType,nil,TYPE_SPELL+TYPE_TRAP)
Duel.Destroy(g,REASON_EFFECT)
end
......@@ -65,4 +65,4 @@ function s.expop(e,tp,eg,ep,ev,re,r,rp)
end
function s.pendvalue(e,c)
return c:IsLocation(LOCATION_HAND)
end
\ No newline at end of file
end
......@@ -6,7 +6,7 @@ function c67489919.initial_effect(c)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetRange(LOCATION_MZONE)
e1:SetCode(EFFECT_INDESTRUCTABLE_BATTLE)
e1:SetCondition(c67489919.indcon)
e1:SetCondition(aux.tkfcon)
e1:SetValue(1)
c:RegisterEffect(e1)
local e2=e1:Clone()
......@@ -38,9 +38,6 @@ function c67489919.initial_effect(c)
e6:SetValue(LOCATION_MZONE+LOCATION_HAND)
c:RegisterEffect(e6)
end
function c67489919.indcon(e)
return Duel.IsExistingMatchingCard(Card.IsType,e:GetHandlerPlayer(),LOCATION_MZONE,0,1,nil,TYPE_TOKEN)
end
function c67489919.spcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0)==0
and Duel.GetFieldGroupCount(tp,0,LOCATION_MZONE)>0
......
......@@ -14,7 +14,7 @@ function c67922702.initial_effect(c)
e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e2:SetRange(LOCATION_MZONE)
e2:SetCode(EFFECT_INDESTRUCTABLE_BATTLE)
e2:SetCondition(c67922702.indcon)
e2:SetCondition(aux.tkfcon)
e2:SetValue(1)
c:RegisterEffect(e2)
local e3=e2:Clone()
......@@ -47,9 +47,6 @@ function c67922702.lvval(e,c)
local tp=c:GetControler()
return Duel.GetMatchingGroup(Card.IsCode,tp,LOCATION_MZONE,0,nil,31533705):GetSum(Card.GetLevel)
end
function c67922702.indcon(e)
return Duel.IsExistingMatchingCard(Card.IsType,e:GetHandlerPlayer(),LOCATION_MZONE,0,1,nil,TYPE_TOKEN)
end
function c67922702.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,1,0,0)
......
......@@ -68,4 +68,4 @@ function s.repval(e,c)
end
function s.repop(e,tp,eg,ep,ev,re,r,rp)
Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_EFFECT+REASON_REPLACE)
end
\ No newline at end of file
end
......@@ -69,4 +69,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
\ No newline at end of file
end
......@@ -87,4 +87,4 @@ function c71948047.setop(e,tp,eg,ep,ev,re,r,rp)
if tc:IsRelateToEffect(e) then
Duel.SSet(tp,tc)
end
end
\ No newline at end of file
end
......@@ -84,7 +84,7 @@ function c7206349.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE+LOCATION_MZONE) and c7206349.thfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c7206349.thfilter,tp,LOCATION_GRAVE+LOCATION_MZONE,LOCATION_GRAVE+LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND)
local g=Duel.SelectTarget(tp,c7206349.thfilter,tp,LOCATION_GRAVE+LOCATION_MZONE,LOCATION_GRAVE+LOCATION_MZONE,1,1,nil)
local g=aux.SelectTargetFromFieldFirst(tp,c7206349.thfilter,tp,LOCATION_GRAVE+LOCATION_MZONE,LOCATION_GRAVE+LOCATION_MZONE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0)
end
function c7206349.thop(e,tp,eg,ep,ev,re,r,rp)
......
......@@ -6,7 +6,7 @@ function c72291078.initial_effect(c)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetRange(LOCATION_MZONE)
e1:SetCode(EFFECT_INDESTRUCTABLE_BATTLE)
e1:SetCondition(c72291078.indcon)
e1:SetCondition(aux.tkfcon)
e1:SetValue(1)
c:RegisterEffect(e1)
local e2=e1:Clone()
......@@ -34,9 +34,6 @@ function c72291078.initial_effect(c)
e4:SetOperation(c72291078.spop)
c:RegisterEffect(e4)
end
function c72291078.indcon(e)
return Duel.IsExistingMatchingCard(Card.IsType,e:GetHandlerPlayer(),LOCATION_MZONE,0,1,nil,TYPE_TOKEN)
end
function c72291078.filter(c)
return c:IsSetCard(0x101b) and c:IsSummonable(true,nil)
end
......
......@@ -23,7 +23,8 @@ function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.GetLocationCount(1-tp,LOCATION_MZONE)>0
and Duel.IsExistingTarget(s.filter,tp,LOCATION_REMOVED,0,1,nil,e,tp)
and Duel.IsExistingTarget(s.filter,tp,0,LOCATION_REMOVED,1,nil,e,tp) end
and Duel.IsExistingTarget(s.filter,tp,0,LOCATION_REMOVED,1,nil,e,tp)
and not Duel.IsPlayerAffectedByEffect(tp,59822133) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g1=Duel.SelectTarget(tp,s.filter,tp,LOCATION_REMOVED,0,1,1,nil,e,tp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
......@@ -33,10 +34,9 @@ function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
end
function s.activate(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetTargetsRelateToChain()
if #g==2 and Duel.IsPlayerAffectedByEffect(tp,59822133) then return end
local sc1=g:Filter(Card.IsControler,nil,tp):GetFirst()
local sc2=g:Filter(Card.IsControler,nil,1-tp):GetFirst()
if sc1 and Duel.SpecialSummonStep(sc1,0,tp,1-tp,false,false,POS_FACEUP) and sc2 then
if sc1 and Duel.SpecialSummonStep(sc1,0,tp,1-tp,false,false,POS_FACEUP) and sc2 and not Duel.IsPlayerAffectedByEffect(tp,59822133) then
Duel.SpecialSummonStep(sc2,0,tp,tp,false,false,POS_FACEUP)
end
Duel.SpecialSummonComplete()
......
......@@ -64,4 +64,4 @@ function c7336745.damop(e,tp,eg,ep,ev,re,r,rp)
e1:SetTargetRange(1,0)
e1:SetReset(RESET_PHASE+PHASE_DAMAGE)
Duel.RegisterEffect(e1,tp)
end
\ No newline at end of file
end
......@@ -48,7 +48,7 @@ function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
e:SetCategory(0)
e:SetOperation(s.mvop)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
Duel.SelectTarget(tp,s.mfilter,tp,0,LOCATION_MZONE+LOCATION_GRAVE,1,1,nil,tp,0)
local g=aux.SelectTargetFromFieldFirst(tp,s.mfilter,tp,0,LOCATION_MZONE+LOCATION_GRAVE,1,1,nil,tp,0)
else
e:SetCategory(CATEGORY_SPECIAL_SUMMON)
e:SetOperation(s.spop)
......
......@@ -95,4 +95,4 @@ function c75728539.thop(e,tp,eg,ep,ev,re,r,rp)
if c:IsRelateToEffect(e) then
Duel.SendtoHand(c,nil,REASON_EFFECT)
end
end
\ No newline at end of file
end
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
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