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) ...@@ -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 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 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) 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 if g:IsExists(Card.IsLocation,1,nil,LOCATION_GRAVE) then
Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,g:GetCount(),1-tp,LOCATION_GRAVE) Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,g:GetCount(),1-tp,LOCATION_GRAVE)
else else
......
...@@ -84,4 +84,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) ...@@ -84,4 +84,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end if not c:IsRelateToEffect(e) then return end
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP) Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
end end
\ No newline at end of file
...@@ -98,4 +98,4 @@ function s.tgop(e,tp,eg,ep,ev,re,r,rp) ...@@ -98,4 +98,4 @@ function s.tgop(e,tp,eg,ep,ev,re,r,rp)
end end
end end
end end
end end
\ No newline at end of file
...@@ -14,7 +14,7 @@ function c15335853.initial_effect(c) ...@@ -14,7 +14,7 @@ function c15335853.initial_effect(c)
e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE) e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e2:SetRange(LOCATION_MZONE) e2:SetRange(LOCATION_MZONE)
e2:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) e2:SetCode(EFFECT_INDESTRUCTABLE_BATTLE)
e2:SetCondition(c15335853.indcon) e2:SetCondition(aux.tkfcon)
e2:SetValue(1) e2:SetValue(1)
c:RegisterEffect(e2) c:RegisterEffect(e2)
local e3=e2:Clone() local e3=e2:Clone()
...@@ -47,9 +47,6 @@ function c15335853.lvval(e,c) ...@@ -47,9 +47,6 @@ function c15335853.lvval(e,c)
local tp=c:GetControler() local tp=c:GetControler()
return Duel.GetMatchingGroup(Card.IsCode,tp,LOCATION_MZONE,0,nil,31533705):GetSum(Card.GetLevel) return Duel.GetMatchingGroup(Card.IsCode,tp,LOCATION_MZONE,0,nil,31533705):GetSum(Card.GetLevel)
end 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) 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 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) 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) ...@@ -52,7 +52,7 @@ function c15862758.operation(e,tp,eg,ep,ev,re,r,rp)
e2:SetTargetRange(0,LOCATION_MZONE) e2:SetTargetRange(0,LOCATION_MZONE)
e2:SetCondition(c15862758.effcon) e2:SetCondition(c15862758.effcon)
e2:SetLabel(turn) e2:SetLabel(turn)
e2:SetReset(RESET_EVENT+RESETS_WITHOUT_TEMP_REMOVE) e2:SetReset(RESET_EVENT+RESETS_STANDARD)
c:RegisterEffect(e2) c:RegisterEffect(e2)
local e3=e2:Clone() local e3=e2:Clone()
e3:SetCode(EFFECT_MUST_ATTACK_MONSTER) e3:SetCode(EFFECT_MUST_ATTACK_MONSTER)
...@@ -66,7 +66,7 @@ function c15862758.operation(e,tp,eg,ep,ev,re,r,rp) ...@@ -66,7 +66,7 @@ function c15862758.operation(e,tp,eg,ep,ev,re,r,rp)
e4:SetCondition(c15862758.wincon) e4:SetCondition(c15862758.wincon)
e4:SetOperation(c15862758.winop) e4:SetOperation(c15862758.winop)
e4:SetLabel(turn) e4:SetLabel(turn)
e4:SetReset(RESET_EVENT+RESETS_WITHOUT_TEMP_REMOVE) e4:SetReset(RESET_EVENT+RESETS_STANDARD)
c:RegisterEffect(e4) c:RegisterEffect(e4)
end end
function c15862758.atkcon(e) function c15862758.atkcon(e)
......
...@@ -82,4 +82,4 @@ function s.setop(e,tp,eg,ep,ev,re,r,rp) ...@@ -82,4 +82,4 @@ function s.setop(e,tp,eg,ep,ev,re,r,rp)
e1:SetValue(TYPE_TRAP+TYPE_CONTINUOUS) e1:SetValue(TYPE_TRAP+TYPE_CONTINUOUS)
tc:RegisterEffect(e1) tc:RegisterEffect(e1)
end end
end end
\ No newline at end of file
...@@ -9,7 +9,7 @@ function c16404809.initial_effect(c) ...@@ -9,7 +9,7 @@ function c16404809.initial_effect(c)
c:RegisterEffect(e1) c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(16404809,0)) 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:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetRange(LOCATION_MZONE) e2:SetRange(LOCATION_MZONE)
e2:SetCode(EVENT_PHASE+PHASE_END) e2:SetCode(EVENT_PHASE+PHASE_END)
......
...@@ -14,7 +14,7 @@ function c16943770.initial_effect(c) ...@@ -14,7 +14,7 @@ function c16943770.initial_effect(c)
e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE) e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e2:SetRange(LOCATION_MZONE) e2:SetRange(LOCATION_MZONE)
e2:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) e2:SetCode(EFFECT_INDESTRUCTABLE_BATTLE)
e2:SetCondition(c16943770.indcon) e2:SetCondition(aux.tkfcon)
e2:SetValue(1) e2:SetValue(1)
c:RegisterEffect(e2) c:RegisterEffect(e2)
local e3=e2:Clone() local e3=e2:Clone()
...@@ -36,9 +36,6 @@ function c16943770.lvval(e,c) ...@@ -36,9 +36,6 @@ function c16943770.lvval(e,c)
local tp=c:GetControler() local tp=c:GetControler()
return Duel.GetMatchingGroup(Card.IsCode,tp,LOCATION_MZONE,0,nil,31533705):GetSum(Card.GetLevel) return Duel.GetMatchingGroup(Card.IsCode,tp,LOCATION_MZONE,0,nil,31533705):GetSum(Card.GetLevel)
end end
function c16943770.indcon(e)
return Duel.IsExistingMatchingCard(Card.IsType,e:GetHandlerPlayer(),LOCATION_MZONE,0,1,nil,TYPE_TOKEN)
end
function c16943770.cfilter(c) function c16943770.cfilter(c)
return c:IsSetCard(0x101b) and not c:IsCode(16943770) and c:IsAbleToRemoveAsCost() return c:IsSetCard(0x101b) and not c:IsCode(16943770) and c:IsAbleToRemoveAsCost()
end end
......
...@@ -81,7 +81,8 @@ function c17228908.tkop(e,tp,eg,ep,ev,re,r,rp) ...@@ -81,7 +81,8 @@ function c17228908.tkop(e,tp,eg,ep,ev,re,r,rp)
end end
end end
function c17228908.tgcon(e) 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 end
function c17228908.tglimit(e,c) function c17228908.tglimit(e,c)
return not c:IsType(TYPE_TOKEN) return not c:IsType(TYPE_TOKEN)
......
...@@ -67,4 +67,4 @@ function s.atkcon(e) ...@@ -67,4 +67,4 @@ function s.atkcon(e)
end end
function s.atktg(e,c) function s.atktg(e,c)
return c:IsType(TYPE_SYNCHRO) and c:IsFaceup() return c:IsType(TYPE_SYNCHRO) and c:IsFaceup()
end end
\ No newline at end of file
...@@ -72,4 +72,4 @@ function c17462320.thop(e,tp,eg,ep,ev,re,r,rp) ...@@ -72,4 +72,4 @@ function c17462320.thop(e,tp,eg,ep,ev,re,r,rp)
if tc:IsRelateToEffect(e) then if tc:IsRelateToEffect(e) then
Duel.SendtoHand(tc,nil,REASON_EFFECT) Duel.SendtoHand(tc,nil,REASON_EFFECT)
end end
end end
\ No newline at end of file
...@@ -55,4 +55,4 @@ function c17550376.atkop(e,tp,eg,ep,ev,re,r,rp) ...@@ -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) e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_DISABLE+RESET_PHASE+PHASE_END)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
end end
\ No newline at end of file
...@@ -63,4 +63,4 @@ function s.tdop(e,tp,eg,ep,ev,re,r,rp) ...@@ -63,4 +63,4 @@ function s.tdop(e,tp,eg,ep,ev,re,r,rp)
if g:GetCount()>0 then if g:GetCount()>0 then
Duel.SendtoDeck(g,nil,SEQ_DECKSHUFFLE,REASON_EFFECT) Duel.SendtoDeck(g,nil,SEQ_DECKSHUFFLE,REASON_EFFECT)
end end
end end
\ No newline at end of file
...@@ -56,4 +56,4 @@ function c18494511.splimit(e,c) ...@@ -56,4 +56,4 @@ function c18494511.splimit(e,c)
end end
function c18494511.codecon(e) function c18494511.codecon(e)
return e:GetHandler():GetEquipCount()>0 return e:GetHandler():GetEquipCount()>0
end end
\ No newline at end of file
...@@ -81,4 +81,4 @@ function c19403423.nsumsuc(e,tp,eg,ep,ev,re,r,rp) ...@@ -81,4 +81,4 @@ function c19403423.nsumsuc(e,tp,eg,ep,ev,re,r,rp)
end end
function c19403423.efun(e,ep,tp) function c19403423.efun(e,ep,tp)
return ep==tp or not e:IsActiveType(TYPE_MONSTER) return ep==tp or not e:IsActiveType(TYPE_MONSTER)
end end
\ No newline at end of file
...@@ -11,7 +11,7 @@ function c1942635.initial_effect(c) ...@@ -11,7 +11,7 @@ function c1942635.initial_effect(c)
e2:SetCode(EFFECT_CANNOT_SELECT_BATTLE_TARGET) e2:SetCode(EFFECT_CANNOT_SELECT_BATTLE_TARGET)
e2:SetRange(LOCATION_SZONE) e2:SetRange(LOCATION_SZONE)
e2:SetTargetRange(0,LOCATION_MZONE) e2:SetTargetRange(0,LOCATION_MZONE)
e2:SetCondition(c1942635.atkcon) e2:SetCondition(aux.tkfcon)
e2:SetValue(c1942635.atkval) e2:SetValue(c1942635.atkval)
c:RegisterEffect(e2) c:RegisterEffect(e2)
--draw --draw
...@@ -27,9 +27,6 @@ function c1942635.initial_effect(c) ...@@ -27,9 +27,6 @@ function c1942635.initial_effect(c)
e3:SetOperation(c1942635.drop) e3:SetOperation(c1942635.drop)
c:RegisterEffect(e3) c:RegisterEffect(e3)
end 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) function c1942635.atkval(e,c)
return c:IsFaceup() and c:IsSetCard(0x134) and c:IsType(TYPE_EFFECT) return c:IsFaceup() and c:IsSetCard(0x134) and c:IsType(TYPE_EFFECT)
end end
......
...@@ -77,4 +77,4 @@ function s.tunop(e,tp,eg,ep,ev,re,r,rp) ...@@ -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) e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e1) tc:RegisterEffect(e1)
end end
end end
\ No newline at end of file
...@@ -54,7 +54,7 @@ function c197042.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) ...@@ -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 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 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) 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) Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,1,0,0)
end end
function c197042.xyzfilter(c) function c197042.xyzfilter(c)
......
...@@ -14,7 +14,7 @@ function c20368763.initial_effect(c) ...@@ -14,7 +14,7 @@ function c20368763.initial_effect(c)
e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE) e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e2:SetRange(LOCATION_MZONE) e2:SetRange(LOCATION_MZONE)
e2:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) e2:SetCode(EFFECT_INDESTRUCTABLE_BATTLE)
e2:SetCondition(c20368763.indcon) e2:SetCondition(aux.tkfcon)
e2:SetValue(1) e2:SetValue(1)
c:RegisterEffect(e2) c:RegisterEffect(e2)
local e3=e2:Clone() local e3=e2:Clone()
...@@ -49,9 +49,6 @@ function c20368763.lvval(e,c) ...@@ -49,9 +49,6 @@ function c20368763.lvval(e,c)
local tp=c:GetControler() local tp=c:GetControler()
return Duel.GetMatchingGroup(Card.IsCode,tp,LOCATION_MZONE,0,nil,31533705):GetSum(Card.GetLevel) return Duel.GetMatchingGroup(Card.IsCode,tp,LOCATION_MZONE,0,nil,31533705):GetSum(Card.GetLevel)
end 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) function c20368763.cfilter(c,tp)
return c:IsPreviousLocation(LOCATION_MZONE) and c:IsPreviousControler(tp) and c:IsReason(REASON_COST) return c:IsPreviousLocation(LOCATION_MZONE) and c:IsPreviousControler(tp) and c:IsReason(REASON_COST)
end end
......
...@@ -70,4 +70,4 @@ function c20515672.tdop(e,tp,eg,ep,ev,re,r,rp) ...@@ -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) Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP)
end end
end end
end end
\ No newline at end of file
...@@ -25,17 +25,17 @@ function s.initial_effect(c) ...@@ -25,17 +25,17 @@ function s.initial_effect(c)
--workaround --workaround
if not aux.rit_mat_hack_check then if not aux.rit_mat_hack_check then
aux.rit_mat_hack_check=true aux.rit_mat_hack_check=true
function aux.rit_mat_hack_exmat_filter(c) function aux.rit_mat_hack_exmat_filter(tc)
return c:IsHasEffect(EFFECT_EXTRA_RITUAL_MATERIAL,c:GetControler()) and c:IsLocation(LOCATION_EXTRA) return tc:IsHasEffect(EFFECT_EXTRA_RITUAL_MATERIAL,tc:GetControler()) and tc:IsLocation(LOCATION_EXTRA)
end 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 if g:FilterCount(aux.rit_mat_hack_exmat_filter,nil)>1 then return false end
Duel.SetSelectedCard(g) Duel.SetSelectedCard(g)
return g:CheckWithSumGreater(Card.GetRitualLevel,lv,c) return g:CheckWithSumGreater(Card.GetRitualLevel,lv,rc)
end 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 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 end
_ReleaseRitualMaterial=Duel.ReleaseRitualMaterial _ReleaseRitualMaterial=Duel.ReleaseRitualMaterial
function Duel.ReleaseRitualMaterial(mat) function Duel.ReleaseRitualMaterial(mat)
......
...@@ -129,4 +129,4 @@ function c2116237.thop(e,tp,eg,ep,ev,re,r,rp) ...@@ -129,4 +129,4 @@ function c2116237.thop(e,tp,eg,ep,ev,re,r,rp)
if c:IsRelateToEffect(e) then if c:IsRelateToEffect(e) then
Duel.SendtoHand(c,nil,REASON_EFFECT) Duel.SendtoHand(c,nil,REASON_EFFECT)
end end
end end
\ No newline at end of file
...@@ -90,4 +90,4 @@ function c21368273.lvop(e,tp,eg,ep,ev,re,r,rp) ...@@ -90,4 +90,4 @@ function c21368273.lvop(e,tp,eg,ep,ev,re,r,rp)
end end
function c21368273.splimit(e,c) function c21368273.splimit(e,c)
return not c:IsType(TYPE_SYNCHRO) and c:IsLocation(LOCATION_EXTRA) return not c:IsType(TYPE_SYNCHRO) and c:IsLocation(LOCATION_EXTRA)
end end
\ No newline at end of file
...@@ -9,7 +9,7 @@ function c22110647.initial_effect(c) ...@@ -9,7 +9,7 @@ function c22110647.initial_effect(c)
e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE) e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e2:SetRange(LOCATION_MZONE) e2:SetRange(LOCATION_MZONE)
e2:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) e2:SetCode(EFFECT_INDESTRUCTABLE_BATTLE)
e2:SetCondition(c22110647.indcon) e2:SetCondition(aux.tkfcon)
e2:SetValue(1) e2:SetValue(1)
c:RegisterEffect(e2) c:RegisterEffect(e2)
local e3=e2:Clone() local e3=e2:Clone()
...@@ -39,9 +39,6 @@ function c22110647.initial_effect(c) ...@@ -39,9 +39,6 @@ function c22110647.initial_effect(c)
e5:SetOperation(c22110647.desop) e5:SetOperation(c22110647.desop)
c:RegisterEffect(e5) c:RegisterEffect(e5)
end 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) 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 if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end
e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST)
......
...@@ -31,10 +31,10 @@ function c22404675.sptg(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -31,10 +31,10 @@ function c22404675.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
end end
function c22404675.spop(e,tp,eg,ep,ev,re,r,rp) function c22404675.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() 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.SpecialSummonStep(c,0,tp,tp,false,false,POS_FACEUP) then
if Duel.GetLocationCount(1-tp,LOCATION_MZONE,tp)>0 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) local token=Duel.CreateToken(tp,22404676)
Duel.SpecialSummonStep(token,0,tp,1-tp,false,false,POS_FACEUP_DEFENSE) Duel.SpecialSummonStep(token,0,tp,1-tp,false,false,POS_FACEUP_DEFENSE)
end end
......
...@@ -57,7 +57,7 @@ function c23776077.rmtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) ...@@ -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 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 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) 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 if g:GetFirst():IsLocation(LOCATION_GRAVE) then
Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,1,1-tp,LOCATION_GRAVE) Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,1,1-tp,LOCATION_GRAVE)
else else
......
...@@ -35,4 +35,4 @@ function c25774450.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -35,4 +35,4 @@ function c25774450.activate(e,tp,eg,ep,ev,re,r,rp)
Duel.GetControl(cc,1-tp) Duel.GetControl(cc,1-tp)
end end
end end
end end
\ No newline at end of file
...@@ -26,8 +26,10 @@ function c26118970.sptg(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -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) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_DECK)
local rc=e:GetHandler():GetReasonCard() local rc=e:GetHandler():GetReasonCard()
if rc and (rc:IsCode(73580471) or (rc:IsRace(RACE_PLANT) and rc:IsType(TYPE_SYNCHRO))) then 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) e:SetLabel(1)
else else
e:SetCategory(CATEGORY_SPECIAL_SUMMON)
e:SetLabel(0) e:SetLabel(0)
end end
end end
......
...@@ -28,7 +28,7 @@ function c26211048.eqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) ...@@ -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 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 and Duel.IsExistingTarget(c26211048.eqfilter,tp,0,LOCATION_GRAVE+LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) 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 if g:GetFirst():IsLocation(LOCATION_GRAVE) then
Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,g,1,0,0) Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,g,1,0,0)
end end
......
...@@ -40,4 +40,4 @@ function c27345070.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -40,4 +40,4 @@ function c27345070.activate(e,tp,eg,ep,ev,re,r,rp)
Duel.SendtoHand(tc,nil,REASON_EFFECT) Duel.SendtoHand(tc,nil,REASON_EFFECT)
end end
end end
end end
\ No newline at end of file
...@@ -27,9 +27,10 @@ function c2819435.initial_effect(c) ...@@ -27,9 +27,10 @@ function c2819435.initial_effect(c)
e6:SetDescription(aux.Stringid(2819435,1)) e6:SetDescription(aux.Stringid(2819435,1))
e6:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOKEN) e6:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOKEN)
e6:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) 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:SetCode(EVENT_CHAINING)
e6:SetRange(LOCATION_FZONE) e6:SetRange(LOCATION_FZONE)
e6:SetCountLimit(1,EFFECT_COUNT_CODE_CHAIN)
e6:SetCondition(c2819435.spcon) e6:SetCondition(c2819435.spcon)
e6:SetCost(c2819435.cost) e6:SetCost(c2819435.cost)
e6:SetTarget(c2819435.sptg) e6:SetTarget(c2819435.sptg)
...@@ -81,14 +82,11 @@ function c2819435.thop(e,tp,eg,ep,ev,re,r,rp) ...@@ -81,14 +82,11 @@ function c2819435.thop(e,tp,eg,ep,ev,re,r,rp)
end end
end end
function c2819435.spcon(e,tp,eg,ep,ev,re,r,rp) 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 end
function c2819435.sptg(e,tp,eg,ep,ev,re,r,rp,chk) function c2819435.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 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 Duel.IsPlayerCanSpecialSummonMonster(tp,2819436,0xfa,TYPES_TOKEN_MONSTER,2000,2000,6,RACE_WYRM,ATTRIBUTE_WATER) end
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)
Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,1,0,0) Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,0,0) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,0,0)
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription()) Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
......
...@@ -49,7 +49,7 @@ end ...@@ -49,7 +49,7 @@ end
function c28677304.disop(e,tp,eg,ep,ev,re,r,rp) function c28677304.disop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
local tc=Duel.GetFirstTarget() 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) c:SetCardTarget(tc)
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
......
--VS Dr.マッドラヴ --VS Dr.マッドラヴ
function c29280200.initial_effect(c) function c29280200.initial_effect(c)
--search --search
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(29280200,0)) e1:SetDescription(aux.Stringid(29280200,0))
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e1:SetType(EFFECT_TYPE_TRIGGER_O+EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_TRIGGER_O+EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_DELAY) e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCode(EVENT_SUMMON_SUCCESS) e1:SetCode(EVENT_SUMMON_SUCCESS)
e1:SetCountLimit(1,29280200) e1:SetCountLimit(1,29280200)
e1:SetTarget(c29280200.thtg) e1:SetTarget(c29280200.thtg)
e1:SetOperation(c29280200.thop) e1:SetOperation(c29280200.thop)
c:RegisterEffect(e1) c:RegisterEffect(e1)
local e2=e1:Clone() local e2=e1:Clone()
e2:SetCode(EVENT_SPSUMMON_SUCCESS) e2:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e2) c:RegisterEffect(e2)
--show dark for atk/def down --show dark for atk/def down
local e3=Effect.CreateEffect(c) local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(29280200,1)) e3:SetDescription(aux.Stringid(29280200,1))
e3:SetCategory(CATEGORY_ATKCHANGE+CATEGORY_DEFCHANGE) e3:SetCategory(CATEGORY_ATKCHANGE+CATEGORY_DEFCHANGE)
e3:SetType(EFFECT_TYPE_QUICK_O) e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetProperty(EFFECT_FLAG_DAMAGE_STEP) e3:SetProperty(EFFECT_FLAG_DAMAGE_STEP)
e3:SetCode(EVENT_FREE_CHAIN) e3:SetCode(EVENT_FREE_CHAIN)
e3:SetRange(LOCATION_MZONE) e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1,29280201) e3:SetCountLimit(1,29280201)
e3:SetHintTiming(TIMING_DAMAGE_STEP,TIMING_DAMAGE_STEP+TIMINGS_CHECK_MONSTER+TIMING_END_PHASE) e3:SetHintTiming(TIMING_DAMAGE_STEP,TIMING_DAMAGE_STEP+TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e3:SetCondition(aux.dscon) e3:SetCondition(aux.dscon)
e3:SetCost(c29280200.adcost) e3:SetCost(c29280200.adcost)
e3:SetTarget(c29280200.adtg) e3:SetTarget(c29280200.adtg)
e3:SetOperation(c29280200.adop) e3:SetOperation(c29280200.adop)
c:RegisterEffect(e3) c:RegisterEffect(e3)
--show earth and dark for rtohand --show earth and dark for rtohand
local e4=Effect.CreateEffect(c) local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(29280200,2)) e4:SetDescription(aux.Stringid(29280200,2))
e4:SetCategory(CATEGORY_TOHAND) e4:SetCategory(CATEGORY_TOHAND)
e4:SetType(EFFECT_TYPE_QUICK_O) e4:SetType(EFFECT_TYPE_QUICK_O)
e4:SetCode(EVENT_FREE_CHAIN) e4:SetCode(EVENT_FREE_CHAIN)
e4:SetRange(LOCATION_MZONE) e4:SetRange(LOCATION_MZONE)
e4:SetCountLimit(1,29280201) e4:SetCountLimit(1,29280201)
e4:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE) e4:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e4:SetCost(c29280200.rthcost) e4:SetCost(c29280200.rthcost)
e4:SetTarget(c29280200.rthtg) e4:SetTarget(c29280200.rthtg)
e4:SetOperation(c29280200.rthop) e4:SetOperation(c29280200.rthop)
c:RegisterEffect(e4) c:RegisterEffect(e4)
end end
function c29280200.thfilter(c) function c29280200.thfilter(c)
return c:IsSetCard(0x195) and c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsAbleToHand() return c:IsSetCard(0x195) and c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsAbleToHand()
end end
function c29280200.thtg(e,tp,eg,ep,ev,re,r,rp,chk) function c29280200.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c29280200.thfilter,tp,LOCATION_DECK,0,1,nil) if chk==0 then return Duel.IsExistingMatchingCard(c29280200.thfilter,tp,LOCATION_DECK,0,1,nil)
and Duel.GetFlagEffect(tp,29280200)==0 end and Duel.GetFlagEffect(tp,29280200)==0 end
Duel.RegisterFlagEffect(tp,29280200,RESET_CHAIN,0,1) Duel.RegisterFlagEffect(tp,29280200,RESET_CHAIN,0,1)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end end
function c29280200.thop(e,tp,eg,ep,ev,re,r,rp) function c29280200.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c29280200.thfilter,tp,LOCATION_DECK,0,1,1,nil) local g=Duel.SelectMatchingCard(tp,c29280200.thfilter,tp,LOCATION_DECK,0,1,1,nil)
if #g>0 then if #g>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g) Duel.ConfirmCards(1-tp,g)
end end
end end
function c29280200.adcfilter(c) function c29280200.adcfilter(c)
return c:IsAttribute(ATTRIBUTE_DARK) and not c:IsPublic() return c:IsAttribute(ATTRIBUTE_DARK) and not c:IsPublic()
end end
function c29280200.adcost(e,tp,eg,ep,ev,re,r,rp,chk) function c29280200.adcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c29280200.adcfilter,tp,LOCATION_HAND,0,1,nil) end if chk==0 then return Duel.IsExistingMatchingCard(c29280200.adcfilter,tp,LOCATION_HAND,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONFIRM) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONFIRM)
local g=Duel.SelectMatchingCard(tp,c29280200.adcfilter,tp,LOCATION_HAND,0,1,1,nil) local g=Duel.SelectMatchingCard(tp,c29280200.adcfilter,tp,LOCATION_HAND,0,1,1,nil)
Duel.ConfirmCards(1-tp,g) Duel.ConfirmCards(1-tp,g)
Duel.RaiseEvent(g,EVENT_CUSTOM+9091064,e,REASON_COST,tp,tp,0) Duel.RaiseEvent(g,EVENT_CUSTOM+9091064,e,REASON_COST,tp,tp,0)
Duel.ShuffleHand(tp) Duel.ShuffleHand(tp)
end end
function c29280200.adtg(e,tp,eg,ep,ev,re,r,rp,chk) function c29280200.adtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsFaceup,tp,0,LOCATION_MZONE,1,nil) if chk==0 then return Duel.IsExistingMatchingCard(Card.IsFaceup,tp,0,LOCATION_MZONE,1,nil)
and Duel.GetFlagEffect(tp,29280200)==0 end and Duel.GetFlagEffect(tp,29280200)==0 end
Duel.RegisterFlagEffect(tp,29280200,RESET_CHAIN,0,1) Duel.RegisterFlagEffect(tp,29280200,RESET_CHAIN,0,1)
end end
function c29280200.adop(e,tp,eg,ep,ev,re,r,rp) function c29280200.adop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
local tc=Duel.SelectMatchingCard(tp,Card.IsFaceup,tp,0,LOCATION_MZONE,1,1,nil):GetFirst() local tc=Duel.SelectMatchingCard(tp,Card.IsFaceup,tp,0,LOCATION_MZONE,1,1,nil):GetFirst()
if not tc then return end if not tc then return end
local e1=Effect.CreateEffect(e:GetHandler()) local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetValue(-500) e1:SetValue(-500)
e1:SetReset(RESET_EVENT+RESETS_STANDARD) e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1) tc:RegisterEffect(e1)
local e2=e1:Clone() local e2=e1:Clone()
e2:SetCode(EFFECT_UPDATE_DEFENSE) e2:SetCode(EFFECT_UPDATE_DEFENSE)
tc:RegisterEffect(e2) tc:RegisterEffect(e2)
end end
function c29280200.rthcfilter(c) function c29280200.rthcfilter(c)
return c:IsAttribute(ATTRIBUTE_EARTH+ATTRIBUTE_DARK) and not c:IsPublic() return c:IsAttribute(ATTRIBUTE_EARTH+ATTRIBUTE_DARK) and not c:IsPublic()
end end
function c29280200.rthcost(e,tp,eg,ep,ev,re,r,rp,chk) function c29280200.rthcost(e,tp,eg,ep,ev,re,r,rp,chk)
local g=Duel.GetMatchingGroup(c29280200.rthcfilter,tp,LOCATION_HAND,0,nil) local g=Duel.GetMatchingGroup(c29280200.rthcfilter,tp,LOCATION_HAND,0,nil)
if chk==0 then return g:CheckSubGroup(aux.gfcheck,2,2,Card.IsAttribute,ATTRIBUTE_EARTH,ATTRIBUTE_DARK) end 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) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONFIRM)
local sg=g:SelectSubGroup(tp,aux.gfcheck,false,2,2,Card.IsAttribute,ATTRIBUTE_EARTH,ATTRIBUTE_DARK) local sg=g:SelectSubGroup(tp,aux.gfcheck,false,2,2,Card.IsAttribute,ATTRIBUTE_EARTH,ATTRIBUTE_DARK)
Duel.ConfirmCards(1-tp,sg) Duel.ConfirmCards(1-tp,sg)
Duel.RaiseEvent(sg,EVENT_CUSTOM+9091064,e,REASON_COST,tp,tp,0) Duel.RaiseEvent(sg,EVENT_CUSTOM+9091064,e,REASON_COST,tp,tp,0)
Duel.ShuffleHand(tp) Duel.ShuffleHand(tp)
end end
function c29280200.rthtgfilter(c) function c29280200.rthtgfilter(c)
return c:IsFaceup() and not c:IsType(TYPE_LINK) return c:IsFaceup() and not c:IsType(TYPE_LINK)
end end
function c29280200.rthtg(e,tp,eg,ep,ev,re,r,rp,chk) function c29280200.rthtg(e,tp,eg,ep,ev,re,r,rp,chk)
local g=Duel.GetMatchingGroup(c29280200.rthtgfilter,tp,LOCATION_MZONE,LOCATION_MZONE,nil) local g=Duel.GetMatchingGroup(c29280200.rthtgfilter,tp,LOCATION_MZONE,LOCATION_MZONE,nil)
local tg=g:GetMinGroup(Card.GetDefense) local tg=g:GetMinGroup(Card.GetDefense)
if chk==0 then return tg:IsExists(Card.IsAbleToHand,1,nil) if chk==0 then return tg:IsExists(Card.IsAbleToHand,1,nil)
and Duel.GetFlagEffect(tp,29280200)==0 end and Duel.GetFlagEffect(tp,29280200)==0 end
Duel.RegisterFlagEffect(tp,29280200,RESET_CHAIN,0,1) Duel.RegisterFlagEffect(tp,29280200,RESET_CHAIN,0,1)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,tg,1,PLAYER_ALL,LOCATION_MZONE) Duel.SetOperationInfo(0,CATEGORY_TOHAND,tg,1,PLAYER_ALL,LOCATION_MZONE)
end end
function c29280200.rthop(e,tp,eg,ep,ev,re,r,rp) function c29280200.rthop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(c29280200.rthtgfilter,tp,LOCATION_MZONE,LOCATION_MZONE,nil) local g=Duel.GetMatchingGroup(c29280200.rthtgfilter,tp,LOCATION_MZONE,LOCATION_MZONE,nil)
if #g>0 then if #g>0 then
local tg=g:GetMinGroup(Card.GetDefense) local tg=g:GetMinGroup(Card.GetDefense)
if #tg>1 then if #tg>1 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND)
tg=tg:FilterSelect(tp,Card.IsAbleToHand,1,1,nil) tg=tg:FilterSelect(tp,Card.IsAbleToHand,1,1,nil)
Duel.HintSelection(tg) Duel.HintSelection(tg)
end end
Duel.SendtoHand(tg,nil,REASON_EFFECT) Duel.SendtoHand(tg,nil,REASON_EFFECT)
end end
end end
...@@ -44,7 +44,7 @@ function s.srmtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) ...@@ -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 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 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) 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) Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,1,0,0)
end end
function s.srmop(e,tp,eg,ep,ev,re,r,rp) function s.srmop(e,tp,eg,ep,ev,re,r,rp)
......
--VS ラゼン --VS ラゼン
function c29302858.initial_effect(c) function c29302858.initial_effect(c)
--search --search
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(29302858,0)) e1:SetDescription(aux.Stringid(29302858,0))
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e1:SetType(EFFECT_TYPE_TRIGGER_O+EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_TRIGGER_O+EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_DELAY) e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCode(EVENT_SUMMON_SUCCESS) e1:SetCode(EVENT_SUMMON_SUCCESS)
e1:SetCountLimit(1,29302858) e1:SetCountLimit(1,29302858)
e1:SetTarget(c29302858.thtg) e1:SetTarget(c29302858.thtg)
e1:SetOperation(c29302858.thop) e1:SetOperation(c29302858.thop)
c:RegisterEffect(e1) c:RegisterEffect(e1)
local e2=e1:Clone() local e2=e1:Clone()
e2:SetCode(EVENT_SPSUMMON_SUCCESS) e2:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e2) c:RegisterEffect(e2)
--show fire for indes --show fire for indes
local e3=Effect.CreateEffect(c) local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(29302858,1)) e3:SetDescription(aux.Stringid(29302858,1))
e3:SetType(EFFECT_TYPE_QUICK_O) e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetCode(EVENT_FREE_CHAIN) e3:SetCode(EVENT_FREE_CHAIN)
e3:SetRange(LOCATION_MZONE) e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1,29302859) e3:SetCountLimit(1,29302859)
e3:SetCost(c29302858.indescost) e3:SetCost(c29302858.indescost)
e3:SetTarget(c29302858.indestg) e3:SetTarget(c29302858.indestg)
e3:SetOperation(c29302858.indesop) e3:SetOperation(c29302858.indesop)
c:RegisterEffect(e3) c:RegisterEffect(e3)
--show fire and dark for destroy --show fire and dark for destroy
local e4=Effect.CreateEffect(c) local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(29302858,2)) e4:SetDescription(aux.Stringid(29302858,2))
e4:SetCategory(CATEGORY_DESTROY) e4:SetCategory(CATEGORY_DESTROY)
e4:SetType(EFFECT_TYPE_QUICK_O) e4:SetType(EFFECT_TYPE_QUICK_O)
e4:SetCode(EVENT_FREE_CHAIN) e4:SetCode(EVENT_FREE_CHAIN)
e4:SetRange(LOCATION_MZONE) e4:SetRange(LOCATION_MZONE)
e4:SetCountLimit(1,29302859) e4:SetCountLimit(1,29302859)
e4:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE) e4:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e4:SetCost(c29302858.descost) e4:SetCost(c29302858.descost)
e4:SetTarget(c29302858.destg) e4:SetTarget(c29302858.destg)
e4:SetOperation(c29302858.desop) e4:SetOperation(c29302858.desop)
c:RegisterEffect(e4) c:RegisterEffect(e4)
end end
function c29302858.thfilter(c) function c29302858.thfilter(c)
return c:IsSetCard(0x195) and c:IsType(TYPE_MONSTER) and not c:IsRace(RACE_WARRIOR) and c:IsAbleToHand() return c:IsSetCard(0x195) and c:IsType(TYPE_MONSTER) and not c:IsRace(RACE_WARRIOR) and c:IsAbleToHand()
end end
function c29302858.thtg(e,tp,eg,ep,ev,re,r,rp,chk) 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) if chk==0 then return Duel.IsExistingMatchingCard(c29302858.thfilter,tp,LOCATION_DECK,0,1,nil)
and Duel.GetFlagEffect(tp,29302858)==0 end and Duel.GetFlagEffect(tp,29302858)==0 end
Duel.RegisterFlagEffect(tp,29302858,RESET_CHAIN,0,1) Duel.RegisterFlagEffect(tp,29302858,RESET_CHAIN,0,1)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end end
function c29302858.thop(e,tp,eg,ep,ev,re,r,rp) function c29302858.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c29302858.thfilter,tp,LOCATION_DECK,0,1,1,nil) local g=Duel.SelectMatchingCard(tp,c29302858.thfilter,tp,LOCATION_DECK,0,1,1,nil)
if #g>0 then if #g>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g) Duel.ConfirmCards(1-tp,g)
end end
end end
function c29302858.indescfilter(c) function c29302858.indescfilter(c)
return c:IsAttribute(ATTRIBUTE_FIRE) and not c:IsPublic() return c:IsAttribute(ATTRIBUTE_FIRE) and not c:IsPublic()
end end
function c29302858.indescost(e,tp,eg,ep,ev,re,r,rp,chk) 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 if chk==0 then return Duel.IsExistingMatchingCard(c29302858.indescfilter,tp,LOCATION_HAND,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONFIRM) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONFIRM)
local g=Duel.SelectMatchingCard(tp,c29302858.indescfilter,tp,LOCATION_HAND,0,1,1,nil) local g=Duel.SelectMatchingCard(tp,c29302858.indescfilter,tp,LOCATION_HAND,0,1,1,nil)
Duel.ConfirmCards(1-tp,g) Duel.ConfirmCards(1-tp,g)
Duel.RaiseEvent(g,EVENT_CUSTOM+9091064,e,REASON_COST,tp,tp,0) Duel.RaiseEvent(g,EVENT_CUSTOM+9091064,e,REASON_COST,tp,tp,0)
Duel.ShuffleHand(tp) Duel.ShuffleHand(tp)
end end
function c29302858.indestg(e,tp,eg,ep,ev,re,r,rp,chk) function c29302858.indestg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetFlagEffect(tp,29302858)==0 end if chk==0 then return Duel.GetFlagEffect(tp,29302858)==0 end
Duel.RegisterFlagEffect(tp,29302858,RESET_CHAIN,0,1) Duel.RegisterFlagEffect(tp,29302858,RESET_CHAIN,0,1)
end end
function c29302858.indesop(e,tp,eg,ep,ev,re,r,rp) function c29302858.indesop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
if not c:IsRelateToChain() then return end if not c:IsRelateToChain() then return end
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_INDESTRUCTABLE_EFFECT) e1:SetCode(EFFECT_INDESTRUCTABLE_EFFECT)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetValue(1) e1:SetValue(1)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,1) e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,1)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
function c29302858.descfilter(c) function c29302858.descfilter(c)
return c:IsAttribute(ATTRIBUTE_FIRE+ATTRIBUTE_DARK) and not c:IsPublic() return c:IsAttribute(ATTRIBUTE_FIRE+ATTRIBUTE_DARK) and not c:IsPublic()
end end
function c29302858.descost(e,tp,eg,ep,ev,re,r,rp,chk) function c29302858.descost(e,tp,eg,ep,ev,re,r,rp,chk)
local g=Duel.GetMatchingGroup(c29302858.descfilter,tp,LOCATION_HAND,0,nil) 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 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) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONFIRM)
local sg=g:SelectSubGroup(tp,aux.gfcheck,false,2,2,Card.IsAttribute,ATTRIBUTE_FIRE,ATTRIBUTE_DARK) local sg=g:SelectSubGroup(tp,aux.gfcheck,false,2,2,Card.IsAttribute,ATTRIBUTE_FIRE,ATTRIBUTE_DARK)
Duel.ConfirmCards(1-tp,sg) Duel.ConfirmCards(1-tp,sg)
Duel.RaiseEvent(sg,EVENT_CUSTOM+9091064,e,REASON_COST,tp,tp,0) Duel.RaiseEvent(sg,EVENT_CUSTOM+9091064,e,REASON_COST,tp,tp,0)
Duel.ShuffleHand(tp) Duel.ShuffleHand(tp)
end end
function c29302858.destg(e,tp,eg,ep,ev,re,r,rp,chk) function c29302858.destg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler() local c=e:GetHandler()
local g=c:GetColumnGroup():Filter(Card.IsLocation,nil,LOCATION_MZONE) local g=c:GetColumnGroup():Filter(Card.IsLocation,nil,LOCATION_MZONE)
if chk==0 then return #g>0 and Duel.GetFlagEffect(tp,29302858)==0 end if chk==0 then return #g>0 and Duel.GetFlagEffect(tp,29302858)==0 end
Duel.RegisterFlagEffect(tp,29302858,RESET_CHAIN,0,1) Duel.RegisterFlagEffect(tp,29302858,RESET_CHAIN,0,1)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,#g,0,0) Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,#g,0,0)
end end
function c29302858.desop(e,tp,eg,ep,ev,re,r,rp) function c29302858.desop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
if not c:IsRelateToChain() then return end if not c:IsRelateToChain() then return end
local g=c:GetColumnGroup():Filter(Card.IsLocation,nil,LOCATION_MZONE) local g=c:GetColumnGroup():Filter(Card.IsLocation,nil,LOCATION_MZONE)
Duel.Destroy(g,REASON_EFFECT) Duel.Destroy(g,REASON_EFFECT)
end end
...@@ -84,4 +84,4 @@ function s.spop2(e,tp,eg,ep,ev,re,r,rp) ...@@ -84,4 +84,4 @@ function s.spop2(e,tp,eg,ep,ev,re,r,rp)
Duel.ConfirmCards(1-tp,tc) Duel.ConfirmCards(1-tp,tc)
end end
end end
end end
\ No newline at end of file
...@@ -89,23 +89,8 @@ end ...@@ -89,23 +89,8 @@ end
function c29884951.remtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) 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 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 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) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=nil local g=aux.SelectTargetFromFieldFirst(tp,c29884951.remfilter,tp,LOCATION_ONFIELD+LOCATION_GRAVE,LOCATION_ONFIELD+LOCATION_GRAVE,1,1,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
Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,1,0,0) Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,1,0,0)
end end
function c29884951.remop(e,tp,eg,ep,ev,re,r,rp) 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) ...@@ -102,4 +102,4 @@ function c30095833.penop(e,tp,eg,ep,ev,re,r,rp)
if c:IsRelateToEffect(e) then if c:IsRelateToEffect(e) then
Duel.MoveToField(c,tp,tp,LOCATION_PZONE,POS_FACEUP,true) Duel.MoveToField(c,tp,tp,LOCATION_PZONE,POS_FACEUP,true)
end end
end end
\ No newline at end of file
...@@ -14,7 +14,7 @@ function c30811116.initial_effect(c) ...@@ -14,7 +14,7 @@ function c30811116.initial_effect(c)
e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE) e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e2:SetRange(LOCATION_MZONE) e2:SetRange(LOCATION_MZONE)
e2:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) e2:SetCode(EFFECT_INDESTRUCTABLE_BATTLE)
e2:SetCondition(c30811116.indcon) e2:SetCondition(aux.tkfcon)
e2:SetValue(1) e2:SetValue(1)
c:RegisterEffect(e2) c:RegisterEffect(e2)
local e3=e2:Clone() local e3=e2:Clone()
...@@ -47,9 +47,6 @@ function c30811116.lvval(e,c) ...@@ -47,9 +47,6 @@ function c30811116.lvval(e,c)
local tp=c:GetControler() local tp=c:GetControler()
return Duel.GetMatchingGroup(Card.IsCode,tp,LOCATION_MZONE,0,nil,31533705):GetSum(Card.GetLevel) return Duel.GetMatchingGroup(Card.IsCode,tp,LOCATION_MZONE,0,nil,31533705):GetSum(Card.GetLevel)
end 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) function c30811116.spcon(e,tp,eg,ep,ev,re,r,rp)
return ep~=tp return ep~=tp
end end
......
...@@ -6,7 +6,7 @@ function c31480215.initial_effect(c) ...@@ -6,7 +6,7 @@ function c31480215.initial_effect(c)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetRange(LOCATION_MZONE) e1:SetRange(LOCATION_MZONE)
e1:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) e1:SetCode(EFFECT_INDESTRUCTABLE_BATTLE)
e1:SetCondition(c31480215.indcon) e1:SetCondition(aux.tkfcon)
e1:SetValue(1) e1:SetValue(1)
c:RegisterEffect(e1) c:RegisterEffect(e1)
local e2=e1:Clone() local e2=e1:Clone()
...@@ -33,9 +33,6 @@ function c31480215.initial_effect(c) ...@@ -33,9 +33,6 @@ function c31480215.initial_effect(c)
e4:SetOperation(c31480215.lvop) e4:SetOperation(c31480215.lvop)
c:RegisterEffect(e4) c:RegisterEffect(e4)
end 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) function c31480215.spcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsLocation(LOCATION_GRAVE) and r==REASON_SYNCHRO return e:GetHandler():IsLocation(LOCATION_GRAVE) and r==REASON_SYNCHRO
and e:GetHandler():GetReasonCard():IsRace(RACE_MACHINE) and e:GetHandler():GetReasonCard():IsRace(RACE_MACHINE)
......
...@@ -14,7 +14,7 @@ function c31533704.initial_effect(c) ...@@ -14,7 +14,7 @@ function c31533704.initial_effect(c)
e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE) e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e2:SetRange(LOCATION_MZONE) e2:SetRange(LOCATION_MZONE)
e2:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) e2:SetCode(EFFECT_INDESTRUCTABLE_BATTLE)
e2:SetCondition(c31533704.indcon) e2:SetCondition(aux.tkfcon)
e2:SetValue(1) e2:SetValue(1)
c:RegisterEffect(e2) c:RegisterEffect(e2)
local e3=e2:Clone() local e3=e2:Clone()
...@@ -48,9 +48,6 @@ function c31533704.lvval(e,c) ...@@ -48,9 +48,6 @@ function c31533704.lvval(e,c)
local tp=c:GetControler() local tp=c:GetControler()
return Duel.GetMatchingGroup(Card.IsCode,tp,LOCATION_MZONE,0,nil,31533705):GetSum(Card.GetLevel) return Duel.GetMatchingGroup(Card.IsCode,tp,LOCATION_MZONE,0,nil,31533705):GetSum(Card.GetLevel)
end 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) function c31533704.spfilter(c,tp)
return c:IsControler(tp) and c:IsType(TYPE_TOKEN) return c:IsControler(tp) and c:IsType(TYPE_TOKEN)
end end
......
...@@ -74,4 +74,4 @@ function c31600513.thop(e,tp,eg,ep,ev,re,r,rp) ...@@ -74,4 +74,4 @@ function c31600513.thop(e,tp,eg,ep,ev,re,r,rp)
if tc:IsRelateToBattle() and tc:IsControler(1-tp) then if tc:IsRelateToBattle() and tc:IsControler(1-tp) then
Duel.SendtoHand(tc,nil,REASON_EFFECT) Duel.SendtoHand(tc,nil,REASON_EFFECT)
end end
end end
\ No newline at end of file
...@@ -75,4 +75,4 @@ function c31987203.penop(e,tp,eg,ep,ev,re,r,rp) ...@@ -75,4 +75,4 @@ function c31987203.penop(e,tp,eg,ep,ev,re,r,rp)
if c:IsRelateToEffect(e) then if c:IsRelateToEffect(e) then
Duel.MoveToField(c,tp,tp,LOCATION_PZONE,POS_FACEUP,true) Duel.MoveToField(c,tp,tp,LOCATION_PZONE,POS_FACEUP,true)
end end
end end
\ No newline at end of file
...@@ -4,7 +4,7 @@ function c32828635.initial_effect(c) ...@@ -4,7 +4,7 @@ function c32828635.initial_effect(c)
--salvage --salvage
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(32828635,0)) e2:SetDescription(aux.Stringid(32828635,0))
e2:SetCategory(CATEGORY_TOHAND) e2:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND)
e2:SetType(EFFECT_TYPE_IGNITION) e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_GRAVE) e2:SetRange(LOCATION_GRAVE)
e2:SetCondition(aux.exccon) e2:SetCondition(aux.exccon)
......
...@@ -40,6 +40,7 @@ end ...@@ -40,6 +40,7 @@ end
function s.tgop(e,tp,eg,ep,ev,re,r,rp) function s.tgop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONFIRM) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONFIRM)
local tc=Duel.SelectMatchingCard(tp,s.filter,tp,LOCATION_EXTRA,0,1,1,nil,tp):GetFirst() 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.ConfirmCards(1-tp,tc)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local sc=Duel.SelectMatchingCard(tp,s.sfilter,tp,LOCATION_DECK,0,1,1,nil,tc):GetFirst() 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) ...@@ -55,7 +56,7 @@ function s.tgop(e,tp,eg,ep,ev,re,r,rp)
Duel.RegisterEffect(e1,tp) Duel.RegisterEffect(e1,tp)
local e2=e1:Clone() local e2=e1:Clone()
e2:SetCode(EFFECT_CANNOT_ACTIVATE) e2:SetCode(EFFECT_CANNOT_ACTIVATE)
e2:SetTarget(s.alimit) e2:SetValue(s.alimit)
Duel.RegisterEffect(e2,tp) Duel.RegisterEffect(e2,tp)
end end
end end
......
...@@ -71,4 +71,4 @@ function c35026117.tfop(e,tp,eg,ep,ev,re,r,rp) ...@@ -71,4 +71,4 @@ function c35026117.tfop(e,tp,eg,ep,ev,re,r,rp)
Duel.Destroy(tg,REASON_EFFECT) Duel.Destroy(tg,REASON_EFFECT)
end end
end end
end end
\ No newline at end of file
...@@ -35,6 +35,8 @@ function c36730805.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -35,6 +35,8 @@ function c36730805.activate(e,tp,eg,ep,ev,re,r,rp)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_CHAIN_END) e2:SetCode(EVENT_CHAIN_END)
e2:SetOperation(c36730805.limitop) e2:SetOperation(c36730805.limitop)
e2:SetCountLimit(1)
e2:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e2,tp) Duel.RegisterEffect(e2,tp)
end end
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) 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) ...@@ -64,8 +64,8 @@ function c37343995.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
end end
function c37343995.spop(e,tp,eg,ep,ev,re,r,rp) function c37343995.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
if not c:IsRelateToEffect(e) or Duel.IsPlayerAffectedByEffect(tp,59822133) then return end 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 then 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) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c37343995.spfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp) local g=Duel.SelectMatchingCard(tp,c37343995.spfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp)
if g:GetCount()>0 then if g:GetCount()>0 then
......
...@@ -23,6 +23,7 @@ end ...@@ -23,6 +23,7 @@ end
function c38041940.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) 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 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 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.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 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) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
...@@ -34,6 +35,7 @@ function c38041940.operation(e,tp,eg,ep,ev,re,r,rp) ...@@ -34,6 +35,7 @@ function c38041940.operation(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget() 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 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 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 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) local token=Duel.CreateToken(tp,38041941)
Duel.SpecialSummonStep(token,0,tp,1-tp,false,false,POS_FACEUP_DEFENSE) 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) ...@@ -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() return chkc:IsControler(1-tp) and chkc:IsLocation(LOCATION_GRAVE) and chkc:IsAbleToRemove()
end end
end end
local b1=Duel.IsExistingTarget(Card.IsAbleToHand,tp,0,LOCATION_ONFIELD,1,nil) local c=e:GetHandler()
local b2=Duel.GetFieldGroupCount(1-tp,LOCATION_HAND,0)~=0 local flag=c:GetFlagEffectLabel(38273745) or 0
local b3=Duel.IsExistingTarget(Card.IsAbleToRemove,tp,0,LOCATION_GRAVE,1,nil) 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 if chk==0 then return b1 or b2 or b3 end
local op=aux.SelectFromOptions(tp, local op=aux.SelectFromOptions(tp,
{b1,aux.Stringid(38273745,1)}, {b1,aux.Stringid(38273745,1)},
{b2,aux.Stringid(38273745,2)}, {b2,aux.Stringid(38273745,2)},
{b3,aux.Stringid(38273745,3)}) {b3,aux.Stringid(38273745,3)})
e:SetLabel(op) 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 if op==1 then
e:SetCategory(CATEGORY_TOHAND) e:SetCategory(CATEGORY_TOHAND)
e:SetProperty(EFFECT_FLAG_CARD_TARGET) e:SetProperty(EFFECT_FLAG_CARD_TARGET)
......
...@@ -34,23 +34,8 @@ function c38495396.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) ...@@ -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 chkc then return chkc:IsLocation(LOCATION_MZONE+LOCATION_GRAVE) and c38495396.thfilter(chkc) end
if chk==0 then return e:GetHandler():GetFlagEffect(38495396)==0 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 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) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND)
local g=nil local g=aux.SelectTargetFromFieldFirst(tp,c38495396.thfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,LOCATION_MZONE+LOCATION_GRAVE,1,1,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
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0) Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0)
end end
function c38495396.thop(e,tp,eg,ep,ev,re,r,rp) function c38495396.thop(e,tp,eg,ep,ev,re,r,rp)
......
...@@ -155,4 +155,4 @@ end ...@@ -155,4 +155,4 @@ end
function s.resetop(e,tp,eg,ep,ev,re,r,rp) function s.resetop(e,tp,eg,ep,ev,re,r,rp)
Duel.ResetFlagEffect(tp,id) Duel.ResetFlagEffect(tp,id)
e:Reset() e:Reset()
end end
\ No newline at end of file
...@@ -52,7 +52,7 @@ function c39185163.disrmop(e,tp,eg,ep,ev,re,r,rp) ...@@ -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) Duel.RegisterFlagEffect(tp,39185163,RESET_PHASE+PHASE_END,0,1)
else else
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) 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.Remove(g,POS_FACEUP,REASON_EFFECT)
Duel.RegisterFlagEffect(tp,39185164,RESET_PHASE+PHASE_END,0,1) Duel.RegisterFlagEffect(tp,39185164,RESET_PHASE+PHASE_END,0,1)
end end
......
...@@ -148,4 +148,4 @@ function c40785230.thop(e,tp,eg,ep,ev,re,r,rp) ...@@ -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) Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP)
end end
end end
end end
\ No newline at end of file
...@@ -17,7 +17,7 @@ function c41329458.initial_effect(c) ...@@ -17,7 +17,7 @@ function c41329458.initial_effect(c)
e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE) e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e2:SetRange(LOCATION_MZONE) e2:SetRange(LOCATION_MZONE)
e2:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) e2:SetCode(EFFECT_INDESTRUCTABLE_BATTLE)
e2:SetCondition(c41329458.indcon) e2:SetCondition(aux.tkfcon)
e2:SetValue(1) e2:SetValue(1)
c:RegisterEffect(e2) c:RegisterEffect(e2)
local e3=e2:Clone() local e3=e2:Clone()
...@@ -35,9 +35,6 @@ function c41329458.initial_effect(c) ...@@ -35,9 +35,6 @@ function c41329458.initial_effect(c)
e4:SetOperation(c41329458.spop2) e4:SetOperation(c41329458.spop2)
c:RegisterEffect(e4) c:RegisterEffect(e4)
end 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) function c41329458.rfilter(c,tp)
return c:IsSetCard(0x101b) and (c:IsControler(tp) or c:IsFaceup()) return c:IsSetCard(0x101b) and (c:IsControler(tp) or c:IsFaceup())
end end
......
...@@ -57,6 +57,16 @@ function s.splim(e,c) ...@@ -57,6 +57,16 @@ function s.splim(e,c)
return c:GetRace()~=RACE_THUNDER return c:GetRace()~=RACE_THUNDER
end end
function s.operation(e,tp,eg,ep,ev,re,r,rp) function s.operation(e,tp,eg,ep,ev,re,r,rp)
local 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 c=e:GetHandler()
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD) e1:SetType(EFFECT_TYPE_FIELD)
...@@ -66,13 +76,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) ...@@ -66,13 +76,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp)
e1:SetTarget(s.splim) e1:SetTarget(s.splim)
e1:SetReset(RESET_PHASE+PHASE_END) e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp) 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 end
...@@ -69,7 +69,7 @@ function c42741437.rmtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) ...@@ -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 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 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) 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) Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,1,0,0)
end end
function c42741437.rmop(e,tp,eg,ep,ev,re,r,rp) 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) ...@@ -74,4 +74,4 @@ function c42822433.spop(e,tp,eg,ep,ev,re,r,rp)
end end
function c42822433.atktg(e,c) function c42822433.atktg(e,c)
return not c:IsType(TYPE_XYZ) return not c:IsType(TYPE_XYZ)
end end
\ No newline at end of file
...@@ -56,4 +56,4 @@ function c43944080.distg(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -56,4 +56,4 @@ function c43944080.distg(e,tp,eg,ep,ev,re,r,rp,chk)
end end
function c43944080.disop(e,tp,eg,ep,ev,re,r,rp) function c43944080.disop(e,tp,eg,ep,ev,re,r,rp)
Duel.NegateActivation(ev) Duel.NegateActivation(ev)
end end
\ No newline at end of file
...@@ -14,7 +14,7 @@ function c44026393.initial_effect(c) ...@@ -14,7 +14,7 @@ function c44026393.initial_effect(c)
e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE) e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e2:SetRange(LOCATION_MZONE) e2:SetRange(LOCATION_MZONE)
e2:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) e2:SetCode(EFFECT_INDESTRUCTABLE_BATTLE)
e2:SetCondition(c44026393.indcon) e2:SetCondition(aux.tkfcon)
e2:SetValue(1) e2:SetValue(1)
c:RegisterEffect(e2) c:RegisterEffect(e2)
local e3=e2:Clone() local e3=e2:Clone()
...@@ -35,9 +35,6 @@ function c44026393.lvval(e,c) ...@@ -35,9 +35,6 @@ function c44026393.lvval(e,c)
local tp=c:GetControler() local tp=c:GetControler()
return Duel.GetMatchingGroup(Card.IsCode,tp,LOCATION_MZONE,0,nil,31533705):GetSum(Card.GetLevel) return Duel.GetMatchingGroup(Card.IsCode,tp,LOCATION_MZONE,0,nil,31533705):GetSum(Card.GetLevel)
end 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) 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 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) Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST+REASON_DISCARD)
......
...@@ -14,7 +14,7 @@ function c4417407.initial_effect(c) ...@@ -14,7 +14,7 @@ function c4417407.initial_effect(c)
e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE) e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e2:SetRange(LOCATION_MZONE) e2:SetRange(LOCATION_MZONE)
e2:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) e2:SetCode(EFFECT_INDESTRUCTABLE_BATTLE)
e2:SetCondition(c4417407.indcon) e2:SetCondition(aux.tkfcon)
e2:SetValue(1) e2:SetValue(1)
c:RegisterEffect(e2) c:RegisterEffect(e2)
local e3=e2:Clone() local e3=e2:Clone()
...@@ -48,9 +48,6 @@ function c4417407.lvval(e,c) ...@@ -48,9 +48,6 @@ function c4417407.lvval(e,c)
local tp=c:GetControler() local tp=c:GetControler()
return Duel.GetMatchingGroup(Card.IsCode,tp,LOCATION_MZONE,0,nil,31533705):GetSum(Card.GetLevel) return Duel.GetMatchingGroup(Card.IsCode,tp,LOCATION_MZONE,0,nil,31533705):GetSum(Card.GetLevel)
end 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) function c4417407.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,1,0,0) Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,1,0,0)
......
...@@ -62,4 +62,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) ...@@ -62,4 +62,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp)
e1:SetReset(RESET_EVENT+RESETS_STANDARD) e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1) tc:RegisterEffect(e1)
end end
end end
\ No newline at end of file
...@@ -68,4 +68,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) ...@@ -68,4 +68,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp)
if #g>0 then if #g>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end end
end end
\ No newline at end of file
...@@ -87,4 +87,4 @@ function s.damval(e,re,val,r,rp,rc) ...@@ -87,4 +87,4 @@ function s.damval(e,re,val,r,rp,rc)
if r&REASON_EFFECT==REASON_EFFECT then if r&REASON_EFFECT==REASON_EFFECT then
return val*2 return val*2
else return val end else return val end
end end
\ No newline at end of file
...@@ -48,7 +48,7 @@ function s.mvtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) ...@@ -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 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 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) 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 if g:GetFirst():IsLocation(LOCATION_GRAVE) then
Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,g,1,0,0) Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,g,1,0,0)
end end
......
...@@ -75,4 +75,4 @@ function c51779204.effcon(e) ...@@ -75,4 +75,4 @@ function c51779204.effcon(e)
end end
function c51779204.damcon(e) function c51779204.damcon(e)
return e:GetHandler():GetBattleTarget()~=nil return e:GetHandler():GetBattleTarget()~=nil
end end
\ No newline at end of file
...@@ -45,7 +45,7 @@ end ...@@ -45,7 +45,7 @@ end
function c53485634.spop(e,tp,eg,ep,ev,re,r,rp) function c53485634.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS):Filter(c53485634.filter,nil,e,tp) 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 if Duel.SpecialSummonStep(c,0,tp,tp,false,false,POS_FACEUP_DEFENSE) then
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
if ft>0 and g:GetCount()>0 and not Duel.IsPlayerAffectedByEffect(tp,59822133) then 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) ...@@ -71,4 +71,4 @@ function c53754104.posop(e,tp,eg,ep,ev,re,r,rp)
if tc:IsRelateToEffect(e) then if tc:IsRelateToEffect(e) then
Duel.ChangePosition(tc,POS_FACEUP_DEFENSE,POS_FACEUP_ATTACK,POS_FACEUP_ATTACK,POS_FACEUP_ATTACK) Duel.ChangePosition(tc,POS_FACEUP_DEFENSE,POS_FACEUP_ATTACK,POS_FACEUP_ATTACK,POS_FACEUP_ATTACK)
end end
end end
\ No newline at end of file
...@@ -50,4 +50,4 @@ function c54594017.desop(e,tp,eg,ep,ev,re,r,rp) ...@@ -50,4 +50,4 @@ function c54594017.desop(e,tp,eg,ep,ev,re,r,rp)
if tc:IsRelateToEffect(e) then if tc:IsRelateToEffect(e) then
Duel.Destroy(tc,REASON_EFFECT) Duel.Destroy(tc,REASON_EFFECT)
end end
end end
\ No newline at end of file
...@@ -86,4 +86,4 @@ function c54851325.desop(e,tp,eg,ep,ev,re,r,rp) ...@@ -86,4 +86,4 @@ function c54851325.desop(e,tp,eg,ep,ev,re,r,rp)
Duel.HintSelection(g) Duel.HintSelection(g)
Duel.Destroy(g,REASON_EFFECT) Duel.Destroy(g,REASON_EFFECT)
end end
end end
\ No newline at end of file
...@@ -23,7 +23,7 @@ function c55501446.spcon(e,tp,eg,ep,ev,re,r,rp) ...@@ -23,7 +23,7 @@ function c55501446.spcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsPreviousLocation(LOCATION_HAND) return e:GetHandler():IsPreviousLocation(LOCATION_HAND)
end end
function c55501446.sptg(e,tp,eg,ep,ev,re,r,rp,chk) 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 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,e:GetHandler(),1,0,0)
end end
......
--VS プルトンHG --VS プルトンHG
function c55688914.initial_effect(c) function c55688914.initial_effect(c)
--spsummon --spsummon
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(55688914,0)) e1:SetDescription(aux.Stringid(55688914,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON) e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_QUICK_O) e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_FREE_CHAIN) e1:SetCode(EVENT_FREE_CHAIN)
e1:SetRange(LOCATION_HAND) e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,55688914) e1:SetCountLimit(1,55688914)
e1:SetHintTiming(0,TIMING_END_PHASE) e1:SetHintTiming(0,TIMING_END_PHASE)
e1:SetCondition(c55688914.spcon) e1:SetCondition(c55688914.spcon)
e1:SetTarget(c55688914.sptg) e1:SetTarget(c55688914.sptg)
e1:SetOperation(c55688914.spop) e1:SetOperation(c55688914.spop)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--show fire for def up --show fire for def up
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(55688914,1)) e2:SetDescription(aux.Stringid(55688914,1))
e2:SetCategory(CATEGORY_DEFCHANGE) e2:SetCategory(CATEGORY_DEFCHANGE)
e2:SetType(EFFECT_TYPE_QUICK_O) e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN) e2:SetCode(EVENT_FREE_CHAIN)
e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP) e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP)
e2:SetRange(LOCATION_MZONE) e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,55688915) e2:SetCountLimit(1,55688915)
e2:SetHintTiming(TIMING_DAMAGE_STEP) e2:SetHintTiming(TIMING_DAMAGE_STEP)
e2:SetCondition(aux.dscon) e2:SetCondition(aux.dscon)
e2:SetCost(c55688914.defcost) e2:SetCost(c55688914.defcost)
e2:SetTarget(c55688914.deftg) e2:SetTarget(c55688914.deftg)
e2:SetOperation(c55688914.defop) e2:SetOperation(c55688914.defop)
c:RegisterEffect(e2) c:RegisterEffect(e2)
--show earth and dark for atk up --show earth and dark for atk up
local e3=Effect.CreateEffect(c) local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(55688914,2)) e3:SetDescription(aux.Stringid(55688914,2))
e3:SetCategory(CATEGORY_ATKCHANGE) e3:SetCategory(CATEGORY_ATKCHANGE)
e3:SetType(EFFECT_TYPE_QUICK_O) e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetCode(EVENT_FREE_CHAIN) e3:SetCode(EVENT_FREE_CHAIN)
e3:SetProperty(EFFECT_FLAG_DAMAGE_STEP) e3:SetProperty(EFFECT_FLAG_DAMAGE_STEP)
e3:SetRange(LOCATION_MZONE) e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1,55688915) e3:SetCountLimit(1,55688915)
e3:SetHintTiming(TIMING_DAMAGE_STEP) e3:SetHintTiming(TIMING_DAMAGE_STEP)
e3:SetCondition(aux.dscon) e3:SetCondition(aux.dscon)
e3:SetCost(c55688914.atkcost) e3:SetCost(c55688914.atkcost)
e3:SetTarget(c55688914.atktg) e3:SetTarget(c55688914.atktg)
e3:SetOperation(c55688914.atkop) e3:SetOperation(c55688914.atkop)
c:RegisterEffect(e3) c:RegisterEffect(e3)
end end
function c55688914.spcfilter1(c) function c55688914.spcfilter1(c)
return c:GetSequence()<5 return c:GetSequence()<5
end end
function c55688914.spcfilter2(c) function c55688914.spcfilter2(c)
return c:GetSequence()<5 and c:IsSetCard(0x195) and c:IsFaceup() return c:GetSequence()<5 and c:IsSetCard(0x195) and c:IsFaceup()
end end
function c55688914.spcon(e,tp,eg,ep,ev,re,r,rp) function c55688914.spcon(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetTurnPlayer()~=1-tp then return false end if Duel.GetTurnPlayer()~=1-tp then return false end
local ct1=Duel.GetMatchingGroupCount(c55688914.spcfilter1,tp,LOCATION_MZONE,0,nil) local ct1=Duel.GetMatchingGroupCount(c55688914.spcfilter1,tp,LOCATION_MZONE,0,nil)
local ct2=Duel.GetMatchingGroupCount(c55688914.spcfilter2,tp,LOCATION_MZONE,0,nil) local ct2=Duel.GetMatchingGroupCount(c55688914.spcfilter2,tp,LOCATION_MZONE,0,nil)
return ct1==0 or ct1==ct2 return ct1==0 or ct1==ct2
end end
function c55688914.sptg(e,tp,eg,ep,ev,re,r,rp,chk) function c55688914.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler() local c=e:GetHandler()
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
and Duel.GetFlagEffect(tp,55688914)==0 end and Duel.GetFlagEffect(tp,55688914)==0 end
Duel.RegisterFlagEffect(tp,55688914,RESET_CHAIN,0,1) Duel.RegisterFlagEffect(tp,55688914,RESET_CHAIN,0,1)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,0,0) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,0,0)
end end
function c55688914.spop(e,tp,eg,ep,ev,re,r,rp) function c55688914.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
if c:IsRelateToChain() then if c:IsRelateToChain() then
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP) Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
end end
end end
function c55688914.defcfilter(c) function c55688914.defcfilter(c)
return c:IsAttribute(ATTRIBUTE_FIRE) and not c:IsPublic() return c:IsAttribute(ATTRIBUTE_FIRE) and not c:IsPublic()
end end
function c55688914.defcost(e,tp,eg,ep,ev,re,r,rp,chk) 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 if chk==0 then return Duel.IsExistingMatchingCard(c55688914.defcfilter,tp,LOCATION_HAND,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONFIRM) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONFIRM)
local g=Duel.SelectMatchingCard(tp,c55688914.defcfilter,tp,LOCATION_HAND,0,1,1,nil) local g=Duel.SelectMatchingCard(tp,c55688914.defcfilter,tp,LOCATION_HAND,0,1,1,nil)
Duel.ConfirmCards(1-tp,g) Duel.ConfirmCards(1-tp,g)
Duel.RaiseEvent(g,EVENT_CUSTOM+9091064,e,REASON_COST,tp,tp,0) Duel.RaiseEvent(g,EVENT_CUSTOM+9091064,e,REASON_COST,tp,tp,0)
Duel.ShuffleHand(tp) Duel.ShuffleHand(tp)
end end
function c55688914.deftg(e,tp,eg,ep,ev,re,r,rp,chk) function c55688914.deftg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetFlagEffect(tp,55688914)==0 end if chk==0 then return Duel.GetFlagEffect(tp,55688914)==0 end
Duel.RegisterFlagEffect(tp,55688914,RESET_CHAIN,0,1) Duel.RegisterFlagEffect(tp,55688914,RESET_CHAIN,0,1)
end end
function c55688914.defop(e,tp,eg,ep,ev,re,r,rp) function c55688914.defop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
if not c:IsRelateToChain() then return end if not c:IsRelateToChain() then return end
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_DEFENSE) e1:SetCode(EFFECT_UPDATE_DEFENSE)
e1:SetValue(3000) e1:SetValue(3000)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_DISABLE+RESET_PHASE+PHASE_END) e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_DISABLE+RESET_PHASE+PHASE_END)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
function c55688914.atkcfilter(c) function c55688914.atkcfilter(c)
return c:IsAttribute(ATTRIBUTE_EARTH+ATTRIBUTE_DARK) and not c:IsPublic() return c:IsAttribute(ATTRIBUTE_EARTH+ATTRIBUTE_DARK) and not c:IsPublic()
end end
function c55688914.atkcost(e,tp,eg,ep,ev,re,r,rp,chk) function c55688914.atkcost(e,tp,eg,ep,ev,re,r,rp,chk)
local g=Duel.GetMatchingGroup(c55688914.atkcfilter,tp,LOCATION_HAND,0,nil) 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 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) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONFIRM)
local sg=g:SelectSubGroup(tp,aux.gfcheck,false,2,2,Card.IsAttribute,ATTRIBUTE_EARTH,ATTRIBUTE_DARK) local sg=g:SelectSubGroup(tp,aux.gfcheck,false,2,2,Card.IsAttribute,ATTRIBUTE_EARTH,ATTRIBUTE_DARK)
Duel.ConfirmCards(1-tp,sg) Duel.ConfirmCards(1-tp,sg)
Duel.RaiseEvent(sg,EVENT_CUSTOM+9091064,e,REASON_COST,tp,tp,0) Duel.RaiseEvent(sg,EVENT_CUSTOM+9091064,e,REASON_COST,tp,tp,0)
Duel.ShuffleHand(tp) Duel.ShuffleHand(tp)
end end
function c55688914.atktg(e,tp,eg,ep,ev,re,r,rp,chk) function c55688914.atktg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetFlagEffect(tp,55688914)==0 end if chk==0 then return Duel.GetFlagEffect(tp,55688914)==0 end
Duel.RegisterFlagEffect(tp,55688914,RESET_CHAIN,0,1) Duel.RegisterFlagEffect(tp,55688914,RESET_CHAIN,0,1)
end end
function c55688914.atkop(e,tp,eg,ep,ev,re,r,rp) function c55688914.atkop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
if not c:IsRelateToChain() then return end if not c:IsRelateToChain() then return end
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetValue(3000) e1:SetValue(3000)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_DISABLE+RESET_PHASE+PHASE_END) e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_DISABLE+RESET_PHASE+PHASE_END)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
...@@ -70,4 +70,4 @@ function c56510115.atktg(e,c) ...@@ -70,4 +70,4 @@ function c56510115.atktg(e,c)
end end
function c56510115.atkval(e,c) function c56510115.atkval(e,c)
return c:GetCurrentScale()*300 return c:GetCurrentScale()*300
end end
\ No newline at end of file
...@@ -94,7 +94,7 @@ function c56518311.rmtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) ...@@ -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 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 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) 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) Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,1,0,0)
end end
function c56518311.rmop(e,tp,eg,ep,ev,re,r,rp) 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) ...@@ -75,4 +75,4 @@ function c56727340.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end if not c:IsRelateToEffect(e) then return end
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP) Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
end end
\ No newline at end of file
...@@ -78,4 +78,4 @@ function s.spdpop(e,tp,eg,ep,ev,re,r,rp) ...@@ -78,4 +78,4 @@ function s.spdpop(e,tp,eg,ep,ev,re,r,rp)
Duel.BreakEffect() Duel.BreakEffect()
Duel.Draw(tp,1,REASON_EFFECT) Duel.Draw(tp,1,REASON_EFFECT)
end end
end end
\ No newline at end of file
...@@ -36,7 +36,7 @@ function c57416183.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) ...@@ -36,7 +36,7 @@ function c57416183.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SELF) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SELF)
local g1=Duel.SelectTarget(tp,c57416183.cfilter,tp,LOCATION_MZONE,0,1,1,nil) local g1=Duel.SelectTarget(tp,c57416183.cfilter,tp,LOCATION_MZONE,0,1,1,nil)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_OPPO) 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) g1:Merge(g2)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g1,g1:GetCount(),0,0) Duel.SetOperationInfo(0,CATEGORY_TOHAND,g1,g1:GetCount(),0,0)
end end
......
...@@ -3,7 +3,7 @@ function c57769391.initial_effect(c) ...@@ -3,7 +3,7 @@ function c57769391.initial_effect(c)
--mill --mill
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(57769391,0)) 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:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE) e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1,57769391) e1:SetCountLimit(1,57769391)
......
...@@ -45,14 +45,14 @@ function s.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) ...@@ -45,14 +45,14 @@ function s.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
end end
function s.desfilter(c,tp,seq) function s.desfilter(c,tp,seq)
local sseq=c:GetSequence() local sseq=c:GetSequence()
if c:IsControler(tp) then if c:IsControler(tp) and c:IsLocation(LOCATION_MZONE) then
return sseq==5 and seq==3 or sseq==6 and seq==1 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 end
if c:IsLocation(LOCATION_SZONE) then if c:IsControler(tp) and c:IsLocation(LOCATION_SZONE) then
return sseq<5 and sseq==seq return sseq<5 and sseq==seq
end end
if sseq<5 then 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 end
if sseq>=5 then if sseq>=5 then
return sseq==5 and seq==1 or sseq==6 and seq==3 return sseq==5 and seq==1 or sseq==6 and seq==3
...@@ -60,8 +60,8 @@ function s.desfilter(c,tp,seq) ...@@ -60,8 +60,8 @@ function s.desfilter(c,tp,seq)
end end
function s.desop(e,tp,eg,ep,ev,re,r,rp) function s.desop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then if tc:IsRelateToEffect(e) and tc:IsType(TYPE_MONSTER) then
local cg=Duel.GetMatchingGroup(s.desfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,tc,tp,tc:GetSequence()) 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 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 and Duel.SelectYesNo(tp,aux.Stringid(id,1)) then
Duel.BreakEffect() Duel.BreakEffect()
......
...@@ -85,4 +85,4 @@ function c60023855.spop(e,tp,eg,ep,ev,re,r,rp) ...@@ -85,4 +85,4 @@ function c60023855.spop(e,tp,eg,ep,ev,re,r,rp)
if tc:IsRelateToEffect(e) then if tc:IsRelateToEffect(e) then
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)
end end
end end
\ No newline at end of file
...@@ -40,7 +40,7 @@ function c601193.tdtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) ...@@ -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 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 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) 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) Duel.SetOperationInfo(0,CATEGORY_TODECK,g,1,0,0)
end end
function c601193.tdop(e,tp,eg,ep,ev,re,r,rp) 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) ...@@ -108,7 +108,7 @@ function c60168186.rmtg(e,tp,eg,ep,ev,re,r,rp,chk)
end end
function c60168186.rmop(e,tp,eg,ep,ev,re,r,rp) function c60168186.rmop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) 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 if g:GetCount()>0 then
Duel.Remove(g,POS_FACEUP,REASON_EFFECT) Duel.Remove(g,POS_FACEUP,REASON_EFFECT)
end end
......
...@@ -31,7 +31,7 @@ function c60681103.rmtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) ...@@ -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 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 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) 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() local tc=g:GetFirst()
if tc:IsLocation(LOCATION_GRAVE) then if tc:IsLocation(LOCATION_GRAVE) then
Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,1,1-tp,LOCATION_GRAVE) 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) ...@@ -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 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 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) 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 if g:GetFirst():IsLocation(LOCATION_GRAVE) then
Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,1,1-tp,LOCATION_GRAVE) Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,1,1-tp,LOCATION_GRAVE)
else else
......
...@@ -100,4 +100,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) ...@@ -100,4 +100,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp)
local xyz=xyzg:Select(tp,1,1,nil):GetFirst() local xyz=xyzg:Select(tp,1,1,nil):GetFirst()
Duel.XyzSummon(tp,xyz,g,1,6) Duel.XyzSummon(tp,xyz,g,1,6)
end end
end end
\ No newline at end of file
...@@ -124,4 +124,4 @@ function c66150724.disop(e,tp,eg,ep,ev,re,r,rp) ...@@ -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 if re:GetActiveType()==TYPE_PENDULUM+TYPE_SPELL and p==tp and bit.band(loc,LOCATION_PZONE)~=0 then
Duel.NegateEffect(ev) Duel.NegateEffect(ev)
end end
end end
\ No newline at end of file
...@@ -14,7 +14,7 @@ function c66200210.initial_effect(c) ...@@ -14,7 +14,7 @@ function c66200210.initial_effect(c)
e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE) e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e2:SetRange(LOCATION_MZONE) e2:SetRange(LOCATION_MZONE)
e2:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) e2:SetCode(EFFECT_INDESTRUCTABLE_BATTLE)
e2:SetCondition(c66200210.indcon) e2:SetCondition(aux.tkfcon)
e2:SetValue(1) e2:SetValue(1)
c:RegisterEffect(e2) c:RegisterEffect(e2)
local e3=e2:Clone() local e3=e2:Clone()
...@@ -46,9 +46,6 @@ function c66200210.lvval(e,c) ...@@ -46,9 +46,6 @@ function c66200210.lvval(e,c)
local tp=c:GetControler() local tp=c:GetControler()
return Duel.GetMatchingGroup(Card.IsCode,tp,LOCATION_MZONE,0,nil,31533705):GetSum(Card.GetLevel) return Duel.GetMatchingGroup(Card.IsCode,tp,LOCATION_MZONE,0,nil,31533705):GetSum(Card.GetLevel)
end 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) function c66200210.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,2,0,0) Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,2,0,0)
......
--VS パンテラ --VS パンテラ
function c66401502.initial_effect(c) function c66401502.initial_effect(c)
--spsummon --spsummon
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(66401502,0)) e1:SetDescription(aux.Stringid(66401502,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON) e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_IGNITION) e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_HAND) e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,66401502) e1:SetCountLimit(1,66401502)
e1:SetCondition(c66401502.spcon) e1:SetCondition(c66401502.spcon)
e1:SetTarget(c66401502.sptg) e1:SetTarget(c66401502.sptg)
e1:SetOperation(c66401502.spop) e1:SetOperation(c66401502.spop)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--show earth for indes --show earth for indes
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(66401502,1)) e2:SetDescription(aux.Stringid(66401502,1))
e2:SetType(EFFECT_TYPE_QUICK_O) e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN) e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_MZONE) e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,66401503) e2:SetCountLimit(1,66401503)
e2:SetCost(c66401502.indescost) e2:SetCost(c66401502.indescost)
e2:SetCondition(aux.bpcon) e2:SetCondition(aux.bpcon)
e2:SetTarget(c66401502.indestg) e2:SetTarget(c66401502.indestg)
e2:SetOperation(c66401502.indesop) e2:SetOperation(c66401502.indesop)
c:RegisterEffect(e2) c:RegisterEffect(e2)
--show earth and fire for destroy --show earth and fire for destroy
local e3=Effect.CreateEffect(c) local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(66401502,2)) e3:SetDescription(aux.Stringid(66401502,2))
e3:SetCategory(CATEGORY_DESTROY) e3:SetCategory(CATEGORY_DESTROY)
e3:SetType(EFFECT_TYPE_QUICK_O) e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetCode(EVENT_FREE_CHAIN) e3:SetCode(EVENT_FREE_CHAIN)
e3:SetRange(LOCATION_MZONE) e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1,66401503) e3:SetCountLimit(1,66401503)
e3:SetHintTiming(0,TIMING_EQUIP+TIMING_END_PHASE) e3:SetHintTiming(0,TIMING_EQUIP+TIMING_END_PHASE)
e3:SetCost(c66401502.descost) e3:SetCost(c66401502.descost)
e3:SetTarget(c66401502.destg) e3:SetTarget(c66401502.destg)
e3:SetOperation(c66401502.desop) e3:SetOperation(c66401502.desop)
c:RegisterEffect(e3) c:RegisterEffect(e3)
end end
function c66401502.spcfilter(c) function c66401502.spcfilter(c)
return c:GetSequence()<5 return c:GetSequence()<5
end end
function c66401502.spcon(e,tp,eg,ep,ev,re,r,rp) function c66401502.spcon(e,tp,eg,ep,ev,re,r,rp)
return not Duel.IsExistingMatchingCard(c66401502.spcfilter,tp,LOCATION_MZONE,0,1,nil) return not Duel.IsExistingMatchingCard(c66401502.spcfilter,tp,LOCATION_MZONE,0,1,nil)
end end
function c66401502.sptg(e,tp,eg,ep,ev,re,r,rp,chk) function c66401502.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler() local c=e:GetHandler()
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
and Duel.GetFlagEffect(tp,66401502)==0 end and Duel.GetFlagEffect(tp,66401502)==0 end
Duel.RegisterFlagEffect(tp,66401502,RESET_CHAIN,0,1) Duel.RegisterFlagEffect(tp,66401502,RESET_CHAIN,0,1)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,0,0) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,0,0)
end end
function c66401502.spop(e,tp,eg,ep,ev,re,r,rp) function c66401502.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
if c:IsRelateToChain() then if c:IsRelateToChain() then
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP) Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
end end
end end
function c66401502.indescfilter(c) function c66401502.indescfilter(c)
return c:IsAttribute(ATTRIBUTE_EARTH) and not c:IsPublic() return c:IsAttribute(ATTRIBUTE_EARTH) and not c:IsPublic()
end end
function c66401502.indescost(e,tp,eg,ep,ev,re,r,rp,chk) 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 if chk==0 then return Duel.IsExistingMatchingCard(c66401502.indescfilter,tp,LOCATION_HAND,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONFIRM) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONFIRM)
local g=Duel.SelectMatchingCard(tp,c66401502.indescfilter,tp,LOCATION_HAND,0,1,1,nil) local g=Duel.SelectMatchingCard(tp,c66401502.indescfilter,tp,LOCATION_HAND,0,1,1,nil)
Duel.ConfirmCards(1-tp,g) Duel.ConfirmCards(1-tp,g)
Duel.RaiseEvent(g,EVENT_CUSTOM+9091064,e,REASON_COST,tp,tp,0) Duel.RaiseEvent(g,EVENT_CUSTOM+9091064,e,REASON_COST,tp,tp,0)
Duel.ShuffleHand(tp) Duel.ShuffleHand(tp)
end end
function c66401502.indestg(e,tp,eg,ep,ev,re,r,rp,chk) function c66401502.indestg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetFlagEffect(tp,66401502)==0 end if chk==0 then return Duel.GetFlagEffect(tp,66401502)==0 end
Duel.RegisterFlagEffect(tp,66401502,RESET_CHAIN,0,1) Duel.RegisterFlagEffect(tp,66401502,RESET_CHAIN,0,1)
end end
function c66401502.indesop(e,tp,eg,ep,ev,re,r,rp) function c66401502.indesop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
if not c:IsRelateToChain() then return end if not c:IsRelateToChain() then return end
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) e1:SetCode(EFFECT_INDESTRUCTABLE_BATTLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetValue(1) e1:SetValue(1)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,1) e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,1)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
function c66401502.descfilter(c) function c66401502.descfilter(c)
return c:IsAttribute(ATTRIBUTE_EARTH+ATTRIBUTE_FIRE) and not c:IsPublic() return c:IsAttribute(ATTRIBUTE_EARTH+ATTRIBUTE_FIRE) and not c:IsPublic()
end end
function c66401502.descost(e,tp,eg,ep,ev,re,r,rp,chk) function c66401502.descost(e,tp,eg,ep,ev,re,r,rp,chk)
local g=Duel.GetMatchingGroup(c66401502.descfilter,tp,LOCATION_HAND,0,nil) 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 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) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONFIRM)
local sg=g:SelectSubGroup(tp,aux.gfcheck,false,2,2,Card.IsAttribute,ATTRIBUTE_EARTH,ATTRIBUTE_FIRE) local sg=g:SelectSubGroup(tp,aux.gfcheck,false,2,2,Card.IsAttribute,ATTRIBUTE_EARTH,ATTRIBUTE_FIRE)
Duel.ConfirmCards(1-tp,sg) Duel.ConfirmCards(1-tp,sg)
Duel.RaiseEvent(sg,EVENT_CUSTOM+9091064,e,REASON_COST,tp,tp,0) Duel.RaiseEvent(sg,EVENT_CUSTOM+9091064,e,REASON_COST,tp,tp,0)
Duel.ShuffleHand(tp) Duel.ShuffleHand(tp)
end end
function c66401502.destg(e,tp,eg,ep,ev,re,r,rp,chk) function c66401502.destg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler() local c=e:GetHandler()
local g=c:GetColumnGroup():Filter(Card.IsType,nil,TYPE_SPELL+TYPE_TRAP) 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 if chk==0 then return #g>0 and Duel.GetFlagEffect(tp,66401502)==0 end
Duel.RegisterFlagEffect(tp,66401502,RESET_CHAIN,0,1) Duel.RegisterFlagEffect(tp,66401502,RESET_CHAIN,0,1)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,#g,0,0) Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,#g,0,0)
end end
function c66401502.desop(e,tp,eg,ep,ev,re,r,rp) function c66401502.desop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
if not c:IsRelateToChain() then return end if not c:IsRelateToChain() then return end
local g=c:GetColumnGroup():Filter(Card.IsType,nil,TYPE_SPELL+TYPE_TRAP) local g=c:GetColumnGroup():Filter(Card.IsType,nil,TYPE_SPELL+TYPE_TRAP)
Duel.Destroy(g,REASON_EFFECT) Duel.Destroy(g,REASON_EFFECT)
end end
...@@ -65,4 +65,4 @@ function s.expop(e,tp,eg,ep,ev,re,r,rp) ...@@ -65,4 +65,4 @@ function s.expop(e,tp,eg,ep,ev,re,r,rp)
end end
function s.pendvalue(e,c) function s.pendvalue(e,c)
return c:IsLocation(LOCATION_HAND) return c:IsLocation(LOCATION_HAND)
end end
\ No newline at end of file
...@@ -6,7 +6,7 @@ function c67489919.initial_effect(c) ...@@ -6,7 +6,7 @@ function c67489919.initial_effect(c)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetRange(LOCATION_MZONE) e1:SetRange(LOCATION_MZONE)
e1:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) e1:SetCode(EFFECT_INDESTRUCTABLE_BATTLE)
e1:SetCondition(c67489919.indcon) e1:SetCondition(aux.tkfcon)
e1:SetValue(1) e1:SetValue(1)
c:RegisterEffect(e1) c:RegisterEffect(e1)
local e2=e1:Clone() local e2=e1:Clone()
...@@ -38,9 +38,6 @@ function c67489919.initial_effect(c) ...@@ -38,9 +38,6 @@ function c67489919.initial_effect(c)
e6:SetValue(LOCATION_MZONE+LOCATION_HAND) e6:SetValue(LOCATION_MZONE+LOCATION_HAND)
c:RegisterEffect(e6) c:RegisterEffect(e6)
end 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) function c67489919.spcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0)==0 return Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0)==0
and Duel.GetFieldGroupCount(tp,0,LOCATION_MZONE)>0 and Duel.GetFieldGroupCount(tp,0,LOCATION_MZONE)>0
......
...@@ -14,7 +14,7 @@ function c67922702.initial_effect(c) ...@@ -14,7 +14,7 @@ function c67922702.initial_effect(c)
e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE) e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e2:SetRange(LOCATION_MZONE) e2:SetRange(LOCATION_MZONE)
e2:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) e2:SetCode(EFFECT_INDESTRUCTABLE_BATTLE)
e2:SetCondition(c67922702.indcon) e2:SetCondition(aux.tkfcon)
e2:SetValue(1) e2:SetValue(1)
c:RegisterEffect(e2) c:RegisterEffect(e2)
local e3=e2:Clone() local e3=e2:Clone()
...@@ -47,9 +47,6 @@ function c67922702.lvval(e,c) ...@@ -47,9 +47,6 @@ function c67922702.lvval(e,c)
local tp=c:GetControler() local tp=c:GetControler()
return Duel.GetMatchingGroup(Card.IsCode,tp,LOCATION_MZONE,0,nil,31533705):GetSum(Card.GetLevel) return Duel.GetMatchingGroup(Card.IsCode,tp,LOCATION_MZONE,0,nil,31533705):GetSum(Card.GetLevel)
end 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) function c67922702.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,1,0,0) Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,1,0,0)
......
...@@ -68,4 +68,4 @@ function s.repval(e,c) ...@@ -68,4 +68,4 @@ function s.repval(e,c)
end end
function s.repop(e,tp,eg,ep,ev,re,r,rp) function s.repop(e,tp,eg,ep,ev,re,r,rp)
Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_EFFECT+REASON_REPLACE) Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_EFFECT+REASON_REPLACE)
end end
\ No newline at end of file
...@@ -69,4 +69,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) ...@@ -69,4 +69,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g) Duel.ConfirmCards(1-tp,g)
end end
end end
\ No newline at end of file
...@@ -87,4 +87,4 @@ function c71948047.setop(e,tp,eg,ep,ev,re,r,rp) ...@@ -87,4 +87,4 @@ function c71948047.setop(e,tp,eg,ep,ev,re,r,rp)
if tc:IsRelateToEffect(e) then if tc:IsRelateToEffect(e) then
Duel.SSet(tp,tc) Duel.SSet(tp,tc)
end end
end end
\ No newline at end of file
...@@ -84,7 +84,7 @@ function c7206349.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) ...@@ -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 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 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) 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) Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0)
end end
function c7206349.thop(e,tp,eg,ep,ev,re,r,rp) function c7206349.thop(e,tp,eg,ep,ev,re,r,rp)
......
...@@ -6,7 +6,7 @@ function c72291078.initial_effect(c) ...@@ -6,7 +6,7 @@ function c72291078.initial_effect(c)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetRange(LOCATION_MZONE) e1:SetRange(LOCATION_MZONE)
e1:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) e1:SetCode(EFFECT_INDESTRUCTABLE_BATTLE)
e1:SetCondition(c72291078.indcon) e1:SetCondition(aux.tkfcon)
e1:SetValue(1) e1:SetValue(1)
c:RegisterEffect(e1) c:RegisterEffect(e1)
local e2=e1:Clone() local e2=e1:Clone()
...@@ -34,9 +34,6 @@ function c72291078.initial_effect(c) ...@@ -34,9 +34,6 @@ function c72291078.initial_effect(c)
e4:SetOperation(c72291078.spop) e4:SetOperation(c72291078.spop)
c:RegisterEffect(e4) c:RegisterEffect(e4)
end end
function c72291078.indcon(e)
return Duel.IsExistingMatchingCard(Card.IsType,e:GetHandlerPlayer(),LOCATION_MZONE,0,1,nil,TYPE_TOKEN)
end
function c72291078.filter(c) function c72291078.filter(c)
return c:IsSetCard(0x101b) and c:IsSummonable(true,nil) return c:IsSetCard(0x101b) and c:IsSummonable(true,nil)
end end
......
...@@ -23,7 +23,8 @@ function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) ...@@ -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 if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.GetLocationCount(1-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,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) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g1=Duel.SelectTarget(tp,s.filter,tp,LOCATION_REMOVED,0,1,1,nil,e,tp) local g1=Duel.SelectTarget(tp,s.filter,tp,LOCATION_REMOVED,0,1,1,nil,e,tp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
...@@ -33,10 +34,9 @@ function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) ...@@ -33,10 +34,9 @@ function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
end end
function s.activate(e,tp,eg,ep,ev,re,r,rp) function s.activate(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetTargetsRelateToChain() 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 sc1=g:Filter(Card.IsControler,nil,tp):GetFirst()
local sc2=g:Filter(Card.IsControler,nil,1-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) Duel.SpecialSummonStep(sc2,0,tp,tp,false,false,POS_FACEUP)
end end
Duel.SpecialSummonComplete() Duel.SpecialSummonComplete()
......
...@@ -64,4 +64,4 @@ function c7336745.damop(e,tp,eg,ep,ev,re,r,rp) ...@@ -64,4 +64,4 @@ function c7336745.damop(e,tp,eg,ep,ev,re,r,rp)
e1:SetTargetRange(1,0) e1:SetTargetRange(1,0)
e1:SetReset(RESET_PHASE+PHASE_DAMAGE) e1:SetReset(RESET_PHASE+PHASE_DAMAGE)
Duel.RegisterEffect(e1,tp) Duel.RegisterEffect(e1,tp)
end end
\ No newline at end of file
...@@ -48,7 +48,7 @@ function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) ...@@ -48,7 +48,7 @@ function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
e:SetCategory(0) e:SetCategory(0)
e:SetOperation(s.mvop) e:SetOperation(s.mvop)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
Duel.SelectTarget(tp,s.mfilter,tp,0,LOCATION_MZONE+LOCATION_GRAVE,1,1,nil,tp,0) local g=aux.SelectTargetFromFieldFirst(tp,s.mfilter,tp,0,LOCATION_MZONE+LOCATION_GRAVE,1,1,nil,tp,0)
else else
e:SetCategory(CATEGORY_SPECIAL_SUMMON) e:SetCategory(CATEGORY_SPECIAL_SUMMON)
e:SetOperation(s.spop) e:SetOperation(s.spop)
......
...@@ -95,4 +95,4 @@ function c75728539.thop(e,tp,eg,ep,ev,re,r,rp) ...@@ -95,4 +95,4 @@ function c75728539.thop(e,tp,eg,ep,ev,re,r,rp)
if c:IsRelateToEffect(e) then if c:IsRelateToEffect(e) then
Duel.SendtoHand(c,nil,REASON_EFFECT) Duel.SendtoHand(c,nil,REASON_EFFECT)
end end
end end
\ No newline at end of file
...@@ -15,7 +15,7 @@ function c76403456.condition(e,tp,eg,ep,ev,re,r,rp) ...@@ -15,7 +15,7 @@ function c76403456.condition(e,tp,eg,ep,ev,re,r,rp)
end end
function c76403456.target(e,tp,eg,ep,ev,re,r,rp,chk) function c76403456.target(e,tp,eg,ep,ev,re,r,rp,chk)
local val=math.ceil(Duel.GetBattleDamage(tp)/500) local val=math.ceil(Duel.GetBattleDamage(tp)/500)
if chk==0 then return Duel.IsPlayerCanDiscardDeck(tp,val) if chk==0 then return val>0 and Duel.IsPlayerCanDiscardDeck(tp,val)
and not Duel.IsPlayerAffectedByEffect(tp,EFFECT_AVOID_BATTLE_DAMAGE) end and not Duel.IsPlayerAffectedByEffect(tp,EFFECT_AVOID_BATTLE_DAMAGE) end
Duel.SetOperationInfo(0,CATEGORY_DECKDES,nil,0,tp,0) Duel.SetOperationInfo(0,CATEGORY_DECKDES,nil,0,tp,0)
end end
......
...@@ -120,4 +120,4 @@ function c76840111.efilter3(c) ...@@ -120,4 +120,4 @@ function c76840111.efilter3(c)
end end
function c76840111.efilter4(c) function c76840111.efilter4(c)
return c:IsSetCard(0x1046) and c:IsFaceup() return c:IsSetCard(0x1046) and c:IsFaceup()
end end
\ No newline at end of file
...@@ -14,7 +14,7 @@ function c76902476.initial_effect(c) ...@@ -14,7 +14,7 @@ function c76902476.initial_effect(c)
e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE) e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e2:SetRange(LOCATION_MZONE) e2:SetRange(LOCATION_MZONE)
e2:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) e2:SetCode(EFFECT_INDESTRUCTABLE_BATTLE)
e2:SetCondition(c76902476.indcon) e2:SetCondition(aux.tkfcon)
e2:SetValue(1) e2:SetValue(1)
c:RegisterEffect(e2) c:RegisterEffect(e2)
local e3=e2:Clone() local e3=e2:Clone()
...@@ -35,9 +35,6 @@ function c76902476.lvval(e,c) ...@@ -35,9 +35,6 @@ function c76902476.lvval(e,c)
local tp=c:GetControler() local tp=c:GetControler()
return Duel.GetMatchingGroup(Card.IsCode,tp,LOCATION_MZONE,0,nil,31533705):GetSum(Card.GetLevel) return Duel.GetMatchingGroup(Card.IsCode,tp,LOCATION_MZONE,0,nil,31533705):GetSum(Card.GetLevel)
end end
function c76902476.indcon(e)
return Duel.IsExistingMatchingCard(Card.IsType,e:GetHandlerPlayer(),LOCATION_MZONE,0,1,nil,TYPE_TOKEN)
end
function c76902476.indtg(e,c) function c76902476.indtg(e,c)
return c:IsCode(31533705) return c:IsCode(31533705)
end end
......
...@@ -81,4 +81,4 @@ function s.activate2(e,tp,eg,ep,ev,re,r,rp) ...@@ -81,4 +81,4 @@ function s.activate2(e,tp,eg,ep,ev,re,r,rp)
if g:GetCount()>0 then if g:GetCount()>0 then
Duel.SSet(tp,g:GetFirst()) Duel.SSet(tp,g:GetFirst())
end end
end end
\ No newline at end of file
...@@ -77,4 +77,4 @@ function c78098950.todop(e,tp,eg,ep,ev,re,r,rp) ...@@ -77,4 +77,4 @@ function c78098950.todop(e,tp,eg,ep,ev,re,r,rp)
if #g==0 then return end if #g==0 then return end
Duel.Hint(HINT_CARD,0,78098950) Duel.Hint(HINT_CARD,0,78098950)
Duel.SendtoDeck(g,nil,SEQ_DECKSHUFFLE,REASON_EFFECT) Duel.SendtoDeck(g,nil,SEQ_DECKSHUFFLE,REASON_EFFECT)
end end
\ No newline at end of file
...@@ -58,4 +58,4 @@ function c79210531.thop(e,tp,eg,ep,ev,re,r,rp) ...@@ -58,4 +58,4 @@ function c79210531.thop(e,tp,eg,ep,ev,re,r,rp)
if #g==0 then return end if #g==0 then return end
Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g) Duel.ConfirmCards(1-tp,g)
end end
\ No newline at end of file
...@@ -80,4 +80,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) ...@@ -80,4 +80,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp)
if tc:IsRelateToEffect(e) then if tc:IsRelateToEffect(e) then
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)
end end
end end
\ No newline at end of file
...@@ -80,4 +80,4 @@ function c82090807.dhop(e,tp,eg,ep,ev,re,r,rp) ...@@ -80,4 +80,4 @@ function c82090807.dhop(e,tp,eg,ep,ev,re,r,rp)
if tc:IsRelateToEffect(e) and tc:GetOverlayCount()>0 then if tc:IsRelateToEffect(e) and tc:GetOverlayCount()>0 then
tc:RemoveOverlayCard(tp,1,2,REASON_EFFECT) tc:RemoveOverlayCard(tp,1,2,REASON_EFFECT)
end end
end end
\ No newline at end of file
...@@ -107,4 +107,4 @@ function c82112494.penop(e,tp,eg,ep,ev,re,r,rp) ...@@ -107,4 +107,4 @@ function c82112494.penop(e,tp,eg,ep,ev,re,r,rp)
if c:IsRelateToEffect(e) then if c:IsRelateToEffect(e) then
Duel.MoveToField(c,tp,tp,LOCATION_PZONE,POS_FACEUP,true) Duel.MoveToField(c,tp,tp,LOCATION_PZONE,POS_FACEUP,true)
end end
end end
\ No newline at end of file
...@@ -37,7 +37,7 @@ function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) ...@@ -37,7 +37,7 @@ function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_ONFIELD+LOCATION_GRAVE) and chkc:IsAbleToRemove() and chkc~=c end if chkc then return chkc:IsLocation(LOCATION_ONFIELD+LOCATION_GRAVE) and chkc:IsAbleToRemove() and chkc~=c end
if chk==0 then return Duel.IsExistingTarget(Card.IsAbleToRemove,tp,LOCATION_ONFIELD+LOCATION_GRAVE,LOCATION_ONFIELD+LOCATION_GRAVE,1,c) end if chk==0 then return Duel.IsExistingTarget(Card.IsAbleToRemove,tp,LOCATION_ONFIELD+LOCATION_GRAVE,LOCATION_ONFIELD+LOCATION_GRAVE,1,c) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectTarget(tp,Card.IsAbleToRemove,tp,LOCATION_ONFIELD+LOCATION_GRAVE,LOCATION_ONFIELD+LOCATION_GRAVE,1,1,c) local g=aux.SelectTargetFromFieldFirst(tp,Card.IsAbleToRemove,tp,LOCATION_ONFIELD+LOCATION_GRAVE,LOCATION_ONFIELD+LOCATION_GRAVE,1,1,c)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,1,0,0) Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,1,0,0)
end end
function s.activate(e,tp,eg,ep,ev,re,r,rp) function s.activate(e,tp,eg,ep,ev,re,r,rp)
......
...@@ -66,4 +66,4 @@ function c83334932.lvop(e,tp,eg,ep,ev,re,r,rp) ...@@ -66,4 +66,4 @@ function c83334932.lvop(e,tp,eg,ep,ev,re,r,rp)
e1:SetReset(RESET_EVENT+RESETS_STANDARD) e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1) tc:RegisterEffect(e1)
end end
end end
\ No newline at end of file
...@@ -60,7 +60,7 @@ function s.tdtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) ...@@ -60,7 +60,7 @@ function s.tdtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then return Duel.IsExistingTarget(Card.IsAbleToDeck,tp,0,LOCATION_ONFIELD+LOCATION_GRAVE,1,nil) end if chk==0 then return Duel.IsExistingTarget(Card.IsAbleToDeck,tp,0,LOCATION_ONFIELD+LOCATION_GRAVE,1,nil) end
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription()) Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) 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) Duel.SetOperationInfo(0,CATEGORY_TODECK,g,1,0,0)
end end
function s.tdop(e,tp,eg,ep,ev,re,r,rp) function s.tdop(e,tp,eg,ep,ev,re,r,rp)
......
...@@ -62,4 +62,4 @@ end ...@@ -62,4 +62,4 @@ end
function s.damop(e,tp,eg,ep,ev,re,r,rp) function s.damop(e,tp,eg,ep,ev,re,r,rp)
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
Duel.Damage(p,d,REASON_EFFECT) Duel.Damage(p,d,REASON_EFFECT)
end end
\ No newline at end of file
...@@ -7,63 +7,84 @@ function c86852702.initial_effect(c) ...@@ -7,63 +7,84 @@ function c86852702.initial_effect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN) e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,86852702+EFFECT_COUNT_CODE_OATH) e1:SetCountLimit(1,86852702+EFFECT_COUNT_CODE_OATH)
e1:SetCost(c86852702.cost1) e1:SetCost(c86852702.cost)
e1:SetTarget(c86852702.target1) e1:SetTarget(c86852702.target)
e1:SetOperation(c86852702.activate1) e1:SetOperation(c86852702.activate)
c:RegisterEffect(e1) c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetDescription(aux.Stringid(86852702,1))
e2:SetCost(c86852702.cost2)
e2:SetTarget(c86852702.target2)
e2:SetOperation(c86852702.activate2)
c:RegisterEffect(e2)
end end
function c86852702.cost1(e,tp,eg,ep,ev,re,r,rp,chk) function c86852702.cost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler() e:SetLabel(1)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,c) end if chk==0 then return true end
Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST+REASON_DISCARD,nil)
end
function c86852702.thfilter1(c)
return c:IsSetCard(0x36) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand()
end
function c86852702.target1(e,tp,eg,ep,ev,re,r,rp,chk)
local g=Duel.GetMatchingGroup(c86852702.thfilter1,tp,LOCATION_DECK,0,nil)
if chk==0 then return g:GetClassCount(Card.GetCode)>=2 end
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,2,tp,LOCATION_DECK)
end
function c86852702.activate1(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(c86852702.thfilter1,tp,LOCATION_DECK,0,nil)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local hg=g:SelectSubGroup(tp,aux.dncheck,false,2,2)
if hg then
Duel.SendtoHand(hg,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,hg)
end
end end
function c86852702.costfilter(c) function c86852702.costfilter(c)
return c:IsSetCard(0x36) and c:IsDiscardable() return c:IsSetCard(0x36) and c:IsDiscardable()
end end
function c86852702.cost2(e,tp,eg,ep,ev,re,r,rp,chk) function c86852702.thfilter1(c)
local c=e:GetHandler() return c:IsSetCard(0x36) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand()
if chk==0 then return Duel.IsExistingMatchingCard(c86852702.costfilter,tp,LOCATION_HAND,0,1,c) end
Duel.DiscardHand(tp,c86852702.costfilter,1,1,REASON_COST+REASON_DISCARD,nil)
end end
function c86852702.thfilter2(c) function c86852702.thfilter2(c)
return c:IsSetCard(0x36) and not c:IsCode(86852702) and c:IsAbleToHand() return c:IsSetCard(0x36) and not c:IsCode(86852702) and c:IsAbleToHand()
end end
function c86852702.target2(e,tp,eg,ep,ev,re,r,rp,chk) function c86852702.target(e,tp,eg,ep,ev,re,r,rp,chk)
local g=Duel.GetMatchingGroup(c86852702.thfilter2,tp,LOCATION_DECK,0,nil) local c=e:GetHandler()
if chk==0 then return g:GetClassCount(Card.GetCode)>=2 end local count1=Duel.GetMatchingGroup(c86852702.thfilter1,tp,LOCATION_DECK,0,nil):GetClassCount(Card.GetCode)
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription()) local count2=Duel.GetMatchingGroup(c86852702.thfilter2,tp,LOCATION_DECK,0,nil):GetClassCount(Card.GetCode)
local b1=Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,c) and count1>=2
local b2=Duel.IsExistingMatchingCard(c86852702.costfilter,tp,LOCATION_HAND,0,1,c) and count2>=2
if chk==0 then
if e:GetLabel()==1 then
e:SetLabel(0)
return b1 or b2
else
return count1>=2 or count2>=2
end
end
if e:GetLabel()==1 then
e:SetLabel(0)
local op=0
if b1 and b2 then
op=Duel.SelectOption(tp,aux.Stringid(86852702,0),aux.Stringid(86852702,1))
elseif b1 then
op=Duel.SelectOption(tp,aux.Stringid(86852702,0))
else
op=Duel.SelectOption(tp,aux.Stringid(86852702,1))+1
end
if op==0 then
Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST+REASON_DISCARD,nil)
else
Duel.DiscardHand(tp,c86852702.costfilter,1,1,REASON_COST+REASON_DISCARD,nil)
end
e:SetLabel(0,op)
else
local op=0
if count1>=2 and count2>=2 then
op=Duel.SelectOption(tp,aux.Stringid(86852702,0),aux.Stringid(86852702,1))
elseif count1>=2 then
op=Duel.SelectOption(tp,aux.Stringid(86852702,0))
else
op=Duel.SelectOption(tp,aux.Stringid(86852702,1))+1
end
e:SetLabel(0,op)
end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,2,tp,LOCATION_DECK) Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,2,tp,LOCATION_DECK)
end end
function c86852702.activate2(e,tp,eg,ep,ev,re,r,rp) function c86852702.activate(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(c86852702.thfilter2,tp,LOCATION_DECK,0,nil) local label,op=e:GetLabel()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) if op==0 then
local hg=g:SelectSubGroup(tp,aux.dncheck,false,2,2) local g=Duel.GetMatchingGroup(c86852702.thfilter1,tp,LOCATION_DECK,0,nil)
if hg then Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
Duel.SendtoHand(hg,nil,REASON_EFFECT) local hg=g:SelectSubGroup(tp,aux.dncheck,false,2,2)
Duel.ConfirmCards(1-tp,hg) if hg then
Duel.SendtoHand(hg,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,hg)
end
else
local g=Duel.GetMatchingGroup(c86852702.thfilter2,tp,LOCATION_DECK,0,nil)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local hg=g:SelectSubGroup(tp,aux.dncheck,false,2,2)
if hg then
Duel.SendtoHand(hg,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,hg)
end
end end
end end
...@@ -5,6 +5,7 @@ function c87639778.initial_effect(c) ...@@ -5,6 +5,7 @@ function c87639778.initial_effect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN) e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCondition(c87639778.condition) e1:SetCondition(c87639778.condition)
e1:SetTarget(c87639778.target)
e1:SetOperation(c87639778.activate) e1:SetOperation(c87639778.activate)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--act in hand --act in hand
...@@ -32,6 +33,9 @@ end ...@@ -32,6 +33,9 @@ end
function c87639778.condition(e,tp,eg,ep,ev,re,r,rp) function c87639778.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(c87639778.disfilter,tp,LOCATION_MZONE,0,1,nil) return Duel.IsExistingMatchingCard(c87639778.disfilter,tp,LOCATION_MZONE,0,1,nil)
end end
function c87639778.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetFlagEffect(tp,87639778)==0 end
end
function c87639778.activate(e,tp,eg,ep,ev,re,r,rp) function c87639778.activate(e,tp,eg,ep,ev,re,r,rp)
local e1=Effect.CreateEffect(e:GetHandler()) local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
...@@ -40,6 +44,7 @@ function c87639778.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -40,6 +44,7 @@ function c87639778.activate(e,tp,eg,ep,ev,re,r,rp)
e1:SetOperation(c87639778.disop) e1:SetOperation(c87639778.disop)
e1:SetReset(RESET_PHASE+PHASE_END) e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp) Duel.RegisterEffect(e1,tp)
Duel.RegisterFlagEffect(tp,87639778,RESET_PHASE+PHASE_END,0,1)
end end
function c87639778.discon(e,tp,eg,ep,ev,re,r,rp) function c87639778.discon(e,tp,eg,ep,ev,re,r,rp)
return re:IsActiveType(TYPE_MONSTER) and rp==1-tp return re:IsActiveType(TYPE_MONSTER) and rp==1-tp
......
...@@ -56,7 +56,7 @@ function c89907227.tkop(e,tp,eg,ep,ev,re,r,rp) ...@@ -56,7 +56,7 @@ function c89907227.tkop(e,tp,eg,ep,ev,re,r,rp)
end end
end end
function c89907227.tkcon2(e,tp,eg,ep,ev,re,r,rp) function c89907227.tkcon2(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()~=tp and not Duel.IsExistingMatchingCard(Card.IsType,tp,LOCATION_MZONE,0,1,nil,TYPE_TOKEN) return Duel.IsTurnPlayer(1-tp) and not aux.tkfcon(e,tp)
end end
function c89907227.tkop2(e,tp,eg,ep,ev,re,r,rp) function c89907227.tkop2(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
......
...@@ -27,23 +27,10 @@ end ...@@ -27,23 +27,10 @@ end
function c90452877.desop(e,tp,eg,ep,ev,re,r,rp) function c90452877.desop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and Duel.Destroy(tc,REASON_EFFECT)~=0 then if tc:IsRelateToEffect(e) and Duel.Destroy(tc,REASON_EFFECT)~=0 then
local b1=Duel.IsExistingMatchingCard(Card.IsAbleToRemove,tp,0,LOCATION_ONFIELD,1,nil)
local b2=Duel.IsExistingMatchingCard(Card.IsAbleToRemove,tp,0,LOCATION_GRAVE,1,nil)
local op=0
if b1 and b2 then
op=Duel.SelectOption(tp,aux.Stringid(90452877,0),aux.Stringid(90452877,1))
else
op=2
end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=nil local g=aux.SelectCardFromFieldFirst(tp,Card.IsAbleToRemove,tp,0,LOCATION_ONFIELD+LOCATION_GRAVE,1,1,nil)
if op==0 then if #g>0 then
g=Duel.SelectMatchingCard(tp,Card.IsAbleToRemove,tp,0,LOCATION_ONFIELD,1,1,nil) Duel.Remove(g,POS_FACEUP,REASON_EFFECT)
elseif op==1 then
g=Duel.SelectMatchingCard(tp,Card.IsAbleToRemove,tp,0,LOCATION_GRAVE,1,1,nil)
else
g=Duel.SelectMatchingCard(tp,Card.IsAbleToRemove,tp,0,LOCATION_ONFIELD+LOCATION_GRAVE,1,1,nil)
end end
Duel.Remove(g,POS_FACEUP,REASON_EFFECT)
end end
end end
--VS 龍帝ヴァリウス --VS 龍帝ヴァリウス
function c91073013.initial_effect(c) function c91073013.initial_effect(c)
--return and spsummon --return and spsummon
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(91073013,0)) e1:SetDescription(aux.Stringid(91073013,0))
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SPECIAL_SUMMON) e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_QUICK_O) e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetRange(LOCATION_HAND) e1:SetRange(LOCATION_HAND)
e1:SetCode(EVENT_FREE_CHAIN) e1:SetCode(EVENT_FREE_CHAIN)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCountLimit(1,91073013) e1:SetCountLimit(1,91073013)
e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_MAIN_END) e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_MAIN_END)
e1:SetCondition(c91073013.spcon) e1:SetCondition(c91073013.spcon)
e1:SetTarget(c91073013.sptg) e1:SetTarget(c91073013.sptg)
e1:SetOperation(c91073013.spop) e1:SetOperation(c91073013.spop)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--show earth to immune --show earth to immune
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(91073013,1)) e2:SetDescription(aux.Stringid(91073013,1))
e2:SetType(EFFECT_TYPE_QUICK_O) e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN) e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_MZONE) e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,91073014) e2:SetCountLimit(1,91073014)
e2:SetCost(c91073013.imcost) e2:SetCost(c91073013.imcost)
e2:SetTarget(c91073013.imtg) e2:SetTarget(c91073013.imtg)
e2:SetOperation(c91073013.imop) e2:SetOperation(c91073013.imop)
c:RegisterEffect(e2) c:RegisterEffect(e2)
--show earth and fire and dark for destroy --show earth and fire and dark for destroy
local e3=Effect.CreateEffect(c) local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(91073013,2)) e3:SetDescription(aux.Stringid(91073013,2))
e3:SetCategory(CATEGORY_DESTROY) e3:SetCategory(CATEGORY_DESTROY)
e3:SetType(EFFECT_TYPE_QUICK_O) e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetCode(EVENT_FREE_CHAIN) e3:SetCode(EVENT_FREE_CHAIN)
e3:SetRange(LOCATION_MZONE) e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1,91073014) e3:SetCountLimit(1,91073014)
e3:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE) e3:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e3:SetCost(c91073013.descost) e3:SetCost(c91073013.descost)
e3:SetTarget(c91073013.destg) e3:SetTarget(c91073013.destg)
e3:SetOperation(c91073013.desop) e3:SetOperation(c91073013.desop)
c:RegisterEffect(e3) c:RegisterEffect(e3)
end end
function c91073013.spcon(e,tp,eg,ep,ev,re,r,rp) function c91073013.spcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetCurrentPhase()==PHASE_MAIN1 or Duel.GetCurrentPhase()==PHASE_MAIN2 return Duel.GetCurrentPhase()==PHASE_MAIN1 or Duel.GetCurrentPhase()==PHASE_MAIN2
end end
function c91073013.spfilter(c,tp) function c91073013.spfilter(c,tp)
return c:IsSetCard(0x195) and c:IsFaceup() and c:IsAbleToHand() and not c:IsRace(RACE_DRAGON) return c:IsSetCard(0x195) and c:IsFaceup() and c:IsAbleToHand() and not c:IsRace(RACE_DRAGON)
and Duel.GetMZoneCount(tp,c)>0 and Duel.GetMZoneCount(tp,c)>0
end end
function c91073013.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c91073013.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and c91073013.spfilter(chkc,tp) end if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and c91073013.spfilter(chkc,tp) end
local c=e:GetHandler() local c=e:GetHandler()
if chk==0 then return c:IsCanBeSpecialSummoned(e,0,tp,false,false) if chk==0 then return c:IsCanBeSpecialSummoned(e,0,tp,false,false)
and Duel.IsExistingTarget(c91073013.spfilter,tp,LOCATION_MZONE,0,1,nil,tp) and Duel.IsExistingTarget(c91073013.spfilter,tp,LOCATION_MZONE,0,1,nil,tp)
and Duel.GetFlagEffect(tp,91073013)==0 end and Duel.GetFlagEffect(tp,91073013)==0 end
Duel.RegisterFlagEffect(tp,91073013,RESET_CHAIN,0,1) Duel.RegisterFlagEffect(tp,91073013,RESET_CHAIN,0,1)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND)
local g=Duel.SelectTarget(tp,c91073013.spfilter,tp,LOCATION_MZONE,0,1,1,nil,tp) local g=Duel.SelectTarget(tp,c91073013.spfilter,tp,LOCATION_MZONE,0,1,1,nil,tp)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0) Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,0,0) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,0,0)
end end
function c91073013.spop(e,tp,eg,ep,ev,re,r,rp) function c91073013.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if tc:IsRelateToChain() and Duel.SendtoHand(tc,nil,REASON_EFFECT)>0 if tc:IsRelateToChain() and Duel.SendtoHand(tc,nil,REASON_EFFECT)>0
and tc:IsLocation(LOCATION_HAND) and c:IsRelateToChain() then and tc:IsLocation(LOCATION_HAND) and c:IsRelateToChain() then
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP) Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
end end
end end
function c91073013.imcfilter(c) function c91073013.imcfilter(c)
return c:IsAttribute(ATTRIBUTE_EARTH) and not c:IsPublic() return c:IsAttribute(ATTRIBUTE_EARTH) and not c:IsPublic()
end end
function c91073013.imcost(e,tp,eg,ep,ev,re,r,rp,chk) function c91073013.imcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c91073013.imcfilter,tp,LOCATION_HAND,0,1,nil) end if chk==0 then return Duel.IsExistingMatchingCard(c91073013.imcfilter,tp,LOCATION_HAND,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONFIRM) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONFIRM)
local g=Duel.SelectMatchingCard(tp,c91073013.imcfilter,tp,LOCATION_HAND,0,1,1,nil) local g=Duel.SelectMatchingCard(tp,c91073013.imcfilter,tp,LOCATION_HAND,0,1,1,nil)
Duel.ConfirmCards(1-tp,g) Duel.ConfirmCards(1-tp,g)
Duel.RaiseEvent(g,EVENT_CUSTOM+9091064,e,REASON_COST,tp,tp,0) Duel.RaiseEvent(g,EVENT_CUSTOM+9091064,e,REASON_COST,tp,tp,0)
Duel.ShuffleHand(tp) Duel.ShuffleHand(tp)
end end
function c91073013.imtg(e,tp,eg,ep,ev,re,r,rp,chk) function c91073013.imtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetFlagEffect(tp,91073013)==0 end if chk==0 then return Duel.GetFlagEffect(tp,91073013)==0 end
Duel.RegisterFlagEffect(tp,91073013,RESET_CHAIN,0,1) Duel.RegisterFlagEffect(tp,91073013,RESET_CHAIN,0,1)
end end
function c91073013.imop(e,tp,eg,ep,ev,re,r,rp) function c91073013.imop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
if not c:IsRelateToChain() then return end if not c:IsRelateToChain() then return end
--immune --immune
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_IMMUNE_EFFECT) e1:SetCode(EFFECT_IMMUNE_EFFECT)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE+EFFECT_FLAG_CANNOT_DISABLE) e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE+EFFECT_FLAG_CANNOT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
e1:SetRange(LOCATION_MZONE) e1:SetRange(LOCATION_MZONE)
e1:SetValue(c91073013.efilter) e1:SetValue(c91073013.efilter)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
function c91073013.efilter(e,re) function c91073013.efilter(e,re)
return e:GetHandlerPlayer()~=re:GetOwnerPlayer() and re:IsActivated() return e:GetHandlerPlayer()~=re:GetOwnerPlayer() and re:IsActivated()
end end
function c91073013.descfilter(c) function c91073013.descfilter(c)
return c:IsAttribute(ATTRIBUTE_EARTH+ATTRIBUTE_DARK+ATTRIBUTE_FIRE) and not c:IsPublic() return c:IsAttribute(ATTRIBUTE_EARTH+ATTRIBUTE_DARK+ATTRIBUTE_FIRE) and not c:IsPublic()
end end
function c91073013.descost(e,tp,eg,ep,ev,re,r,rp,chk) function c91073013.descost(e,tp,eg,ep,ev,re,r,rp,chk)
local g=Duel.GetMatchingGroup(c91073013.descfilter,tp,LOCATION_HAND,0,nil) local g=Duel.GetMatchingGroup(c91073013.descfilter,tp,LOCATION_HAND,0,nil)
if chk==0 then return g:CheckSubGroup(aux.dabcheck,3,3) end if chk==0 then return g:CheckSubGroup(aux.dabcheck,3,3) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONFIRM) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONFIRM)
local sg=g:SelectSubGroup(tp,aux.dabcheck,false,3,3) local sg=g:SelectSubGroup(tp,aux.dabcheck,false,3,3)
Duel.ConfirmCards(1-tp,sg) Duel.ConfirmCards(1-tp,sg)
Duel.RaiseEvent(sg,EVENT_CUSTOM+9091064,e,REASON_COST,tp,tp,0) Duel.RaiseEvent(sg,EVENT_CUSTOM+9091064,e,REASON_COST,tp,tp,0)
Duel.ShuffleHand(tp) Duel.ShuffleHand(tp)
end end
function c91073013.destg(e,tp,eg,ep,ev,re,r,rp,chk) function c91073013.destg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler() local c=e:GetHandler()
local g=Duel.GetMatchingGroup(aux.TRUE,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,c) local g=Duel.GetMatchingGroup(aux.TRUE,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,c)
if chk==0 then return #g>0 and Duel.GetFlagEffect(tp,91073013)==0 end if chk==0 then return #g>0 and Duel.GetFlagEffect(tp,91073013)==0 end
Duel.RegisterFlagEffect(tp,91073013,RESET_CHAIN,0,1) Duel.RegisterFlagEffect(tp,91073013,RESET_CHAIN,0,1)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0) Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
end end
function c91073013.desop(e,tp,eg,ep,ev,re,r,rp) function c91073013.desop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
if not e:GetHandler():IsRelateToChain() then c=nil end if not e:GetHandler():IsRelateToChain() then c=nil end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectMatchingCard(tp,aux.TRUE,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,c) local g=Duel.SelectMatchingCard(tp,aux.TRUE,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,c)
if #g>0 then if #g>0 then
Duel.HintSelection(g) Duel.HintSelection(g)
Duel.Destroy(g,REASON_EFFECT) Duel.Destroy(g,REASON_EFFECT)
end end
end end
...@@ -80,4 +80,4 @@ function c91300233.spop(e,tp,eg,ep,ev,re,r,rp) ...@@ -80,4 +80,4 @@ function c91300233.spop(e,tp,eg,ep,ev,re,r,rp)
if tc:IsRelateToEffect(e) then if tc:IsRelateToEffect(e) then
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)
end end
end end
\ No newline at end of file
...@@ -13,7 +13,7 @@ function c91584698.initial_effect(c) ...@@ -13,7 +13,7 @@ function c91584698.initial_effect(c)
c:RegisterEffect(e2) c:RegisterEffect(e2)
--tohand --tohand
local e3=Effect.CreateEffect(c) local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_TOHAND) e3:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND)
e3:SetType(EFFECT_TYPE_IGNITION) e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetRange(LOCATION_MZONE) e3:SetRange(LOCATION_MZONE)
e3:SetCost(c91584698.thcost) e3:SetCost(c91584698.thcost)
......
--青い涙の天使 --青い涙の天使
local s,id,o=GetID() local s,id,o=GetID()
function s.initial_effect(c) function s.initial_effect(c)
--same effect send this card to grave and summon another card check
local e0=aux.AddThisCardInGraveAlreadyCheck(c)
--Activate --Activate
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,0)) e1:SetDescription(aux.Stringid(id,0))
...@@ -20,6 +22,7 @@ function s.initial_effect(c) ...@@ -20,6 +22,7 @@ function s.initial_effect(c)
e2:SetCode(EVENT_DAMAGE) e2:SetCode(EVENT_DAMAGE)
e2:SetProperty(EFFECT_FLAG_DELAY) e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCountLimit(1,id) e2:SetCountLimit(1,id)
e2:SetLabelObject(e0)
e2:SetCondition(s.setcon) e2:SetCondition(s.setcon)
e2:SetCost(aux.bfgcost) e2:SetCost(aux.bfgcost)
e2:SetTarget(s.settg) e2:SetTarget(s.settg)
...@@ -67,7 +70,8 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -67,7 +70,8 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp)
end end
end end
function s.setcon(e,tp,eg,ep,ev,re,r,rp) function s.setcon(e,tp,eg,ep,ev,re,r,rp)
return bit.band(r,REASON_EFFECT)~=0 local se=e:GetLabelObject():GetLabelObject()
return bit.band(r,REASON_EFFECT)~=0 and (se==nil or e:GetHandler():GetReasonEffect()~=se)
end end
function s.setfilter(c) function s.setfilter(c)
return c:GetType()==TYPE_TRAP and c:IsSSetable() return c:GetType()==TYPE_TRAP and c:IsSSetable()
......
--VS ヘヴィ・ボーガー --VS ヘヴィ・ボーガー
function c92895501.initial_effect(c) function c92895501.initial_effect(c)
--return and spsummon --return and spsummon
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(92895501,0)) e1:SetDescription(aux.Stringid(92895501,0))
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SPECIAL_SUMMON) e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_QUICK_O) e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetRange(LOCATION_HAND) e1:SetRange(LOCATION_HAND)
e1:SetCode(EVENT_FREE_CHAIN) e1:SetCode(EVENT_FREE_CHAIN)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCountLimit(1,92895501) e1:SetCountLimit(1,92895501)
e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_MAIN_END) e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_MAIN_END)
e1:SetCondition(c92895501.spcon) e1:SetCondition(c92895501.spcon)
e1:SetTarget(c92895501.sptg) e1:SetTarget(c92895501.sptg)
e1:SetOperation(c92895501.spop) e1:SetOperation(c92895501.spop)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--show dark for draw --show dark for draw
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(92895501,1)) e2:SetDescription(aux.Stringid(92895501,1))
e2:SetCategory(CATEGORY_DRAW) e2:SetCategory(CATEGORY_DRAW)
e2:SetType(EFFECT_TYPE_QUICK_O) e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN) e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_MZONE) e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,92895502) e2:SetCountLimit(1,92895502)
e2:SetHintTiming(0,TIMING_END_PHASE) e2:SetHintTiming(0,TIMING_END_PHASE)
e2:SetCost(c92895501.drcost) e2:SetCost(c92895501.drcost)
e2:SetTarget(c92895501.drtg) e2:SetTarget(c92895501.drtg)
e2:SetOperation(c92895501.drop) e2:SetOperation(c92895501.drop)
c:RegisterEffect(e2) c:RegisterEffect(e2)
--show earth and fire for damage --show earth and fire for damage
local e3=Effect.CreateEffect(c) local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(92895501,2)) e3:SetDescription(aux.Stringid(92895501,2))
e3:SetCategory(CATEGORY_DAMAGE) e3:SetCategory(CATEGORY_DAMAGE)
e3:SetType(EFFECT_TYPE_QUICK_O) e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetCode(EVENT_FREE_CHAIN) e3:SetCode(EVENT_FREE_CHAIN)
e3:SetRange(LOCATION_MZONE) e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1,92895502) e3:SetCountLimit(1,92895502)
e3:SetHintTiming(0,TIMING_END_PHASE) e3:SetHintTiming(0,TIMING_END_PHASE)
e3:SetCost(c92895501.dmgcost) e3:SetCost(c92895501.dmgcost)
e3:SetTarget(c92895501.dmgtg) e3:SetTarget(c92895501.dmgtg)
e3:SetOperation(c92895501.dmgop) e3:SetOperation(c92895501.dmgop)
c:RegisterEffect(e3) c:RegisterEffect(e3)
end end
function c92895501.spcon(e,tp,eg,ep,ev,re,r,rp) function c92895501.spcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetCurrentPhase()==PHASE_MAIN1 or Duel.GetCurrentPhase()==PHASE_MAIN2 return Duel.GetCurrentPhase()==PHASE_MAIN1 or Duel.GetCurrentPhase()==PHASE_MAIN2
end end
function c92895501.spfilter(c,tp) function c92895501.spfilter(c,tp)
return c:IsSetCard(0x195) and c:IsFaceup() and c:IsAbleToHand() and not c:IsRace(RACE_MACHINE) return c:IsSetCard(0x195) and c:IsFaceup() and c:IsAbleToHand() and not c:IsRace(RACE_MACHINE)
and Duel.GetMZoneCount(tp,c)>0 and Duel.GetMZoneCount(tp,c)>0
end end
function c92895501.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c92895501.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and c92895501.spfilter(chkc,tp) end if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and c92895501.spfilter(chkc,tp) end
local c=e:GetHandler() local c=e:GetHandler()
if chk==0 then return c:IsCanBeSpecialSummoned(e,0,tp,false,false) if chk==0 then return c:IsCanBeSpecialSummoned(e,0,tp,false,false)
and Duel.IsExistingTarget(c92895501.spfilter,tp,LOCATION_MZONE,0,1,nil,tp) and Duel.IsExistingTarget(c92895501.spfilter,tp,LOCATION_MZONE,0,1,nil,tp)
and Duel.GetFlagEffect(tp,92895501)==0 end and Duel.GetFlagEffect(tp,92895501)==0 end
Duel.RegisterFlagEffect(tp,92895501,RESET_CHAIN,0,1) Duel.RegisterFlagEffect(tp,92895501,RESET_CHAIN,0,1)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND)
local g=Duel.SelectTarget(tp,c92895501.spfilter,tp,LOCATION_MZONE,0,1,1,nil,tp) local g=Duel.SelectTarget(tp,c92895501.spfilter,tp,LOCATION_MZONE,0,1,1,nil,tp)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0) Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,0,0) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,0,0)
end end
function c92895501.spop(e,tp,eg,ep,ev,re,r,rp) function c92895501.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if tc:IsRelateToChain() and Duel.SendtoHand(tc,nil,REASON_EFFECT)>0 if tc:IsRelateToChain() and Duel.SendtoHand(tc,nil,REASON_EFFECT)>0
and tc:IsLocation(LOCATION_HAND) and c:IsRelateToChain() then and tc:IsLocation(LOCATION_HAND) and c:IsRelateToChain() then
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP) Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
end end
end end
function c92895501.drcfilter(c) function c92895501.drcfilter(c)
return c:IsAttribute(ATTRIBUTE_DARK) and not c:IsPublic() return c:IsAttribute(ATTRIBUTE_DARK) and not c:IsPublic()
end end
function c92895501.drcost(e,tp,eg,ep,ev,re,r,rp,chk) function c92895501.drcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c92895501.drcfilter,tp,LOCATION_HAND,0,1,nil) end if chk==0 then return Duel.IsExistingMatchingCard(c92895501.drcfilter,tp,LOCATION_HAND,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONFIRM) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONFIRM)
local g=Duel.SelectMatchingCard(tp,c92895501.drcfilter,tp,LOCATION_HAND,0,1,1,nil) local g=Duel.SelectMatchingCard(tp,c92895501.drcfilter,tp,LOCATION_HAND,0,1,1,nil)
Duel.ConfirmCards(1-tp,g) Duel.ConfirmCards(1-tp,g)
Duel.RaiseEvent(g,EVENT_CUSTOM+9091064,e,REASON_COST,tp,tp,0) Duel.RaiseEvent(g,EVENT_CUSTOM+9091064,e,REASON_COST,tp,tp,0)
Duel.ShuffleHand(tp) Duel.ShuffleHand(tp)
end end
function c92895501.drtg(e,tp,eg,ep,ev,re,r,rp,chk) function c92895501.drtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsPlayerCanDraw(tp,1) if chk==0 then return Duel.IsPlayerCanDraw(tp,1)
and Duel.GetFlagEffect(tp,92895501)==0 end and Duel.GetFlagEffect(tp,92895501)==0 end
Duel.RegisterFlagEffect(tp,92895501,RESET_CHAIN,0,1) Duel.RegisterFlagEffect(tp,92895501,RESET_CHAIN,0,1)
Duel.SetTargetPlayer(tp) Duel.SetTargetPlayer(tp)
Duel.SetTargetParam(1) Duel.SetTargetParam(1)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1) Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1)
end end
function c92895501.drop(e,tp,eg,ep,ev,re,r,rp) function c92895501.drop(e,tp,eg,ep,ev,re,r,rp)
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
Duel.Draw(p,d,REASON_EFFECT) Duel.Draw(p,d,REASON_EFFECT)
end end
function c92895501.dmgcfilter(c) function c92895501.dmgcfilter(c)
return c:IsAttribute(ATTRIBUTE_EARTH+ATTRIBUTE_FIRE) and not c:IsPublic() return c:IsAttribute(ATTRIBUTE_EARTH+ATTRIBUTE_FIRE) and not c:IsPublic()
end end
function c92895501.dmgcost(e,tp,eg,ep,ev,re,r,rp,chk) function c92895501.dmgcost(e,tp,eg,ep,ev,re,r,rp,chk)
local g=Duel.GetMatchingGroup(c92895501.dmgcfilter,tp,LOCATION_HAND,0,nil) local g=Duel.GetMatchingGroup(c92895501.dmgcfilter,tp,LOCATION_HAND,0,nil)
if chk==0 then return g:CheckSubGroup(aux.gfcheck,2,2,Card.IsAttribute,ATTRIBUTE_EARTH,ATTRIBUTE_FIRE) end 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) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONFIRM)
local sg=g:SelectSubGroup(tp,aux.gfcheck,false,2,2,Card.IsAttribute,ATTRIBUTE_EARTH,ATTRIBUTE_FIRE) local sg=g:SelectSubGroup(tp,aux.gfcheck,false,2,2,Card.IsAttribute,ATTRIBUTE_EARTH,ATTRIBUTE_FIRE)
Duel.ConfirmCards(1-tp,sg) Duel.ConfirmCards(1-tp,sg)
Duel.RaiseEvent(sg,EVENT_CUSTOM+9091064,e,REASON_COST,tp,tp,0) Duel.RaiseEvent(sg,EVENT_CUSTOM+9091064,e,REASON_COST,tp,tp,0)
Duel.ShuffleHand(tp) Duel.ShuffleHand(tp)
end end
function c92895501.dmgtg(e,tp,eg,ep,ev,re,r,rp,chk) function c92895501.dmgtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetFlagEffect(tp,92895501)==0 end if chk==0 then return Duel.GetFlagEffect(tp,92895501)==0 end
Duel.RegisterFlagEffect(tp,92895501,RESET_CHAIN,0,1) Duel.RegisterFlagEffect(tp,92895501,RESET_CHAIN,0,1)
Duel.SetTargetPlayer(1-tp) Duel.SetTargetPlayer(1-tp)
Duel.SetTargetParam(1500) Duel.SetTargetParam(1500)
Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,1500) Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,1500)
end end
function c92895501.dmgop(e,tp,eg,ep,ev,re,r,rp) function c92895501.dmgop(e,tp,eg,ep,ev,re,r,rp)
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
Duel.Damage(p,d,REASON_EFFECT) Duel.Damage(p,d,REASON_EFFECT)
end end
...@@ -51,7 +51,8 @@ function c9336190.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) ...@@ -51,7 +51,8 @@ function c9336190.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then return not e:GetHandler():IsStatus(STATUS_CHAINING) if chk==0 then return not e:GetHandler():IsStatus(STATUS_CHAINING)
and Duel.GetLocationCount(tp,LOCATION_MZONE)>1 and Duel.GetLocationCount(tp,LOCATION_MZONE)>1
and Duel.IsPlayerCanSpecialSummonCount(tp,2) and Duel.IsPlayerCanSpecialSummonCount(tp,2)
and Duel.IsExistingTarget(c9336190.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end and Duel.IsExistingTarget(c9336190.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp)
and not Duel.IsPlayerAffectedByEffect(tp,59822133) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,c9336190.spfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp) local g=Duel.SelectTarget(tp,c9336190.spfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
g:AddCard(e:GetHandler()) g:AddCard(e:GetHandler())
...@@ -61,6 +62,7 @@ function c9336190.spop(e,tp,eg,ep,ev,re,r,rp) ...@@ -61,6 +62,7 @@ function c9336190.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)>0 if tc:IsRelateToEffect(e) and Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)>0
and not Duel.IsPlayerAffectedByEffect(tp,59822133)
and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and c:IsRelateToEffect(e) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and c:IsRelateToEffect(e)
and Duel.IsPlayerCanSpecialSummonMonster(tp,9336190,0x10db,TYPES_NORMAL_TRAP_MONSTER,0,0,tc:GetLevel(),RACE_WARRIOR,ATTRIBUTE_DARK) then and Duel.IsPlayerCanSpecialSummonMonster(tp,9336190,0x10db,TYPES_NORMAL_TRAP_MONSTER,0,0,tc:GetLevel(),RACE_WARRIOR,ATTRIBUTE_DARK) then
c:AddMonsterAttribute(TYPE_NORMAL,0,0,tc:GetLevel(),0,0) c:AddMonsterAttribute(TYPE_NORMAL,0,0,tc:GetLevel(),0,0)
......
...@@ -14,7 +14,7 @@ function c94973028.initial_effect(c) ...@@ -14,7 +14,7 @@ function c94973028.initial_effect(c)
e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE) e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e2:SetRange(LOCATION_MZONE) e2:SetRange(LOCATION_MZONE)
e2:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) e2:SetCode(EFFECT_INDESTRUCTABLE_BATTLE)
e2:SetCondition(c94973028.indcon) e2:SetCondition(aux.tkfcon)
e2:SetValue(1) e2:SetValue(1)
c:RegisterEffect(e2) c:RegisterEffect(e2)
local e3=e2:Clone() local e3=e2:Clone()
...@@ -47,9 +47,6 @@ function c94973028.lvval(e,c) ...@@ -47,9 +47,6 @@ function c94973028.lvval(e,c)
local tp=c:GetControler() local tp=c:GetControler()
return Duel.GetMatchingGroup(Card.IsCode,tp,LOCATION_MZONE,0,nil,31533705):GetSum(Card.GetLevel) return Duel.GetMatchingGroup(Card.IsCode,tp,LOCATION_MZONE,0,nil,31533705):GetSum(Card.GetLevel)
end end
function c94973028.indcon(e)
return Duel.IsExistingMatchingCard(Card.IsType,e:GetHandlerPlayer(),LOCATION_MZONE,0,1,nil,TYPE_TOKEN)
end
function c94973028.cfilter(c) function c94973028.cfilter(c)
return c:IsFaceup() and c:IsSetCard(0x101b) return c:IsFaceup() and c:IsSetCard(0x101b)
end end
......
...@@ -89,4 +89,4 @@ function c95243515.disop(e,tp,eg,ep,ev,re,r,rp) ...@@ -89,4 +89,4 @@ function c95243515.disop(e,tp,eg,ep,ev,re,r,rp)
tc:RegisterEffect(e2) tc:RegisterEffect(e2)
end end
end end
end end
\ No newline at end of file
...@@ -16,7 +16,7 @@ function c95816395.regop(e,tp,eg,ep,ev,re,r,rp) ...@@ -16,7 +16,7 @@ function c95816395.regop(e,tp,eg,ep,ev,re,r,rp)
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_PHASE+PHASE_END) e1:SetCode(EVENT_PHASE+PHASE_END)
e1:SetCountLimit(1) e1:SetCountLimit(1,95816395)
e1:SetRange(LOCATION_GRAVE) e1:SetRange(LOCATION_GRAVE)
e1:SetTarget(c95816395.thtg) e1:SetTarget(c95816395.thtg)
e1:SetOperation(c95816395.thop) e1:SetOperation(c95816395.thop)
......
...@@ -64,7 +64,7 @@ function c96239878.rmtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) ...@@ -64,7 +64,7 @@ function c96239878.rmtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return (chkc:IsOnField() or chkc:IsLocation(LOCATION_GRAVE)) and chkc:IsControler(1-tp) and chkc:IsAbleToRemove() end if chkc then return (chkc:IsOnField() or chkc:IsLocation(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 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) 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) Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,1,0,0)
end end
function c96239878.rmop(e,tp,eg,ep,ev,re,r,rp) function c96239878.rmop(e,tp,eg,ep,ev,re,r,rp)
......
...@@ -135,4 +135,4 @@ function c97417863.atkop(e,tp,eg,ep,ev,re,r,rp) ...@@ -135,4 +135,4 @@ function c97417863.atkop(e,tp,eg,ep,ev,re,r,rp)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_DISABLE) e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_DISABLE)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
end end
\ No newline at end of file
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
function c97697678.initial_effect(c) function c97697678.initial_effect(c)
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(97697678,0)) e1:SetDescription(aux.Stringid(97697678,0))
e1:SetCategory(CATEGORY_TOHAND) e1:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_PREDRAW) e1:SetCode(EVENT_PREDRAW)
e1:SetRange(LOCATION_MZONE) e1:SetRange(LOCATION_MZONE)
......
...@@ -80,7 +80,7 @@ function c98020526.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -80,7 +80,7 @@ function c98020526.activate(e,tp,eg,ep,ev,re,r,rp)
Duel.RegisterFlagEffect(tp,98020526,RESET_PHASE+PHASE_END,0,1) Duel.RegisterFlagEffect(tp,98020526,RESET_PHASE+PHASE_END,0,1)
elseif opval[op]==2 then elseif opval[op]==2 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local rg=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(c98020526.rfilter),tp,0,LOCATION_MZONE+LOCATION_GRAVE,1,1,nil) local rg=aux.SelectCardFromFieldFirst(tp,aux.NecroValleyFilter(c98020526.rfilter),tp,0,LOCATION_MZONE+LOCATION_GRAVE,1,1,nil)
Duel.HintSelection(rg) Duel.HintSelection(rg)
Duel.Remove(rg,POS_FACEUP,REASON_EFFECT) Duel.Remove(rg,POS_FACEUP,REASON_EFFECT)
Duel.RegisterFlagEffect(tp,98020527,RESET_PHASE+PHASE_END,0,1) Duel.RegisterFlagEffect(tp,98020527,RESET_PHASE+PHASE_END,0,1)
......
...@@ -30,7 +30,7 @@ function c98301564.initial_effect(c) ...@@ -30,7 +30,7 @@ function c98301564.initial_effect(c)
c:RegisterEffect(e4) c:RegisterEffect(e4)
end end
function c98301564.costchange(e,re,rp,val) function c98301564.costchange(e,re,rp,val)
if re and re:IsHasType(EFFECT_TYPE_ACTIVATE) and re:GetHandler():IsType(TYPE_TRAP) and re:GetHandler():IsType(TYPE_COUNTER) then if re and (re:IsHasType(EFFECT_TYPE_ACTIVATE) or re:GetCode()==EFFECT_TRAP_ACT_IN_HAND or re:GetCode()==EFFECT_TRAP_ACT_IN_SET_TURN) and re:GetHandler():IsType(TYPE_TRAP) and re:GetHandler():IsType(TYPE_COUNTER) then
return 0 return 0
else else
return val return val
......
...@@ -30,15 +30,15 @@ function c98905.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) ...@@ -30,15 +30,15 @@ function c98905.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0)
end end
function c98905.activate(e,tp,eg,ep,ev,re,r,rp) function c98905.activate(e,tp,eg,ep,ev,re,r,rp)
if Duel.IsPlayerAffectedByEffect(tp,59822133) then return end
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then if not tc:IsRelateToEffect(e) then return end
if Duel.SpecialSummonStep(tc,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) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c98905.spfilter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp,tc:GetCode()) local g=Duel.SelectMatchingCard(tp,c98905.spfilter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp,tc:GetCode())
if g:GetCount()>0 then if g:GetCount()>0 then
g:AddCard(tc) Duel.SpecialSummonStep(g:GetFirst(),0,tp,tp,false,false,POS_FACEUP)
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end end
end end
Duel.SpecialSummonComplete()
end end
...@@ -807,6 +807,7 @@ HINTMSG_TOZONE =571 --请选择要移动到的位置 ...@@ -807,6 +807,7 @@ HINTMSG_TOZONE =571 --请选择要移动到的位置
HINTMSG_COUNTER =572 --请选择要放置指示物的卡 HINTMSG_COUNTER =572 --请选择要放置指示物的卡
HINTMSG_DISABLE =573 --请选择要无效的卡 HINTMSG_DISABLE =573 --请选择要无效的卡
HINTMSG_OPERATECARD =574 --请选择要操作的卡 HINTMSG_OPERATECARD =574 --请选择要操作的卡
HINTMSG_FIELD_FIRST =575 --请选择场上的卡(按取消可选择其他区域的卡)
--Select --请选择 --Select --请选择
SELECT_HEADS =60 --正面 SELECT_HEADS =60 --正面
SELECT_TAILS =61 --反面 SELECT_TAILS =61 --反面
......
...@@ -928,11 +928,16 @@ function Auxiliary.FOperationMix(insf,sub,...) ...@@ -928,11 +928,16 @@ function Auxiliary.FOperationMix(insf,sub,...)
local notfusion=chkfnf&0x100>0 local notfusion=chkfnf&0x100>0
local concat_fusion=chkfnf&0x200>0 local concat_fusion=chkfnf&0x200>0
local sub2=(sub or notfusion) and not concat_fusion local sub2=(sub or notfusion) and not concat_fusion
local cancel=concat_fusion
local mg=eg:Filter(Auxiliary.FConditionFilterMix,c,c,sub2,concat_fusion,table.unpack(funs)) local mg=eg:Filter(Auxiliary.FConditionFilterMix,c,c,sub2,concat_fusion,table.unpack(funs))
if gc then Duel.SetSelectedCard(gc) end if gc then Duel.SetSelectedCard(gc) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FMATERIAL) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FMATERIAL)
local sg=mg:SelectSubGroup(tp,Auxiliary.FCheckMixGoal,false,#funs,#funs,tp,c,sub2,chkfnf,table.unpack(funs)) local sg=mg:SelectSubGroup(tp,Auxiliary.FCheckMixGoal,cancel,#funs,#funs,tp,c,sub2,chkfnf,table.unpack(funs))
Duel.SetFusionMaterial(sg) if sg then
Duel.SetFusionMaterial(sg)
else
Duel.SetFusionMaterial(Group.CreateGroup())
end
end end
end end
function Auxiliary.FConditionFilterMix(c,fc,sub,concat_fusion,...) function Auxiliary.FConditionFilterMix(c,fc,sub,concat_fusion,...)
...@@ -1050,6 +1055,7 @@ function Auxiliary.FOperationMixRep(insf,sub,fun1,minc,maxc,...) ...@@ -1050,6 +1055,7 @@ function Auxiliary.FOperationMixRep(insf,sub,fun1,minc,maxc,...)
local notfusion=chkfnf&0x100>0 local notfusion=chkfnf&0x100>0
local concat_fusion=chkfnf&0x200>0 local concat_fusion=chkfnf&0x200>0
local sub2=(sub or notfusion) and not concat_fusion local sub2=(sub or notfusion) and not concat_fusion
local cancel=concat_fusion
local mg=eg:Filter(Auxiliary.FConditionFilterMix,c,c,sub2,concat_fusion,fun1,table.unpack(funs)) local mg=eg:Filter(Auxiliary.FConditionFilterMix,c,c,sub2,concat_fusion,fun1,table.unpack(funs))
local sg=Group.CreateGroup() local sg=Group.CreateGroup()
if gc then sg:AddCard(gc) end if gc then sg:AddCard(gc) end
...@@ -1060,8 +1066,11 @@ function Auxiliary.FOperationMixRep(insf,sub,fun1,minc,maxc,...) ...@@ -1060,8 +1066,11 @@ function Auxiliary.FOperationMixRep(insf,sub,fun1,minc,maxc,...)
local cancel_group=sg:Clone() local cancel_group=sg:Clone()
if gc then cancel_group:RemoveCard(gc) end if gc then cancel_group:RemoveCard(gc) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FMATERIAL) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FMATERIAL)
local tc=cg:SelectUnselect(cancel_group,tp,finish,false,minc+#funs,maxc+#funs) local tc=cg:SelectUnselect(cancel_group,tp,finish,cancel,minc+#funs,maxc+#funs)
if not tc then break end if not tc then
if not finish then sg:Clear() end
break
end
if sg:IsContains(tc) then if sg:IsContains(tc) then
sg:RemoveCard(tc) sg:RemoveCard(tc)
else else
...@@ -1680,7 +1689,8 @@ function Auxiliary.AddContactFusionProcedure(c,filter,self_location,opponent_loc ...@@ -1680,7 +1689,8 @@ function Auxiliary.AddContactFusionProcedure(c,filter,self_location,opponent_loc
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e2:SetRange(LOCATION_EXTRA) e2:SetRange(LOCATION_EXTRA)
e2:SetCondition(Auxiliary.ContactFusionCondition(filter,self_location,opponent_location)) e2:SetCondition(Auxiliary.ContactFusionCondition(filter,self_location,opponent_location))
e2:SetOperation(Auxiliary.ContactFusionOperation(filter,self_location,opponent_location,mat_operation,operation_params)) e2:SetTarget(Auxiliary.ContactFusionTarget(filter,self_location,opponent_location))
e2:SetOperation(Auxiliary.ContactFusionOperation(mat_operation,operation_params))
c:RegisterEffect(e2) c:RegisterEffect(e2)
return e2 return e2
end end
...@@ -1696,12 +1706,23 @@ function Auxiliary.ContactFusionCondition(filter,self_location,opponent_location ...@@ -1696,12 +1706,23 @@ function Auxiliary.ContactFusionCondition(filter,self_location,opponent_location
return c:CheckFusionMaterial(mg,nil,tp|0x200) return c:CheckFusionMaterial(mg,nil,tp|0x200)
end end
end end
function Auxiliary.ContactFusionOperation(filter,self_location,opponent_location,mat_operation,operation_params) function Auxiliary.ContactFusionTarget(filter,self_location,opponent_location)
return function(e,tp,eg,ep,ev,re,r,rp,c) return function(e,tp,eg,ep,ev,re,r,rp,chk,c)
local mg=Duel.GetMatchingGroup(Auxiliary.ContactFusionMaterialFilter,tp,self_location,opponent_location,c,c,filter) local mg=Duel.GetMatchingGroup(Auxiliary.ContactFusionMaterialFilter,tp,self_location,opponent_location,c,c,filter)
local g=Duel.SelectFusionMaterial(tp,c,mg,nil,tp|0x200) local g=Duel.SelectFusionMaterial(tp,c,mg,nil,tp|0x200)
if #g>0 then
g:KeepAlive()
e:SetLabelObject(g)
return true
else return false end
end
end
function Auxiliary.ContactFusionOperation(mat_operation,operation_params)
return function(e,tp,eg,ep,ev,re,r,rp,c)
local g=e:GetLabelObject()
c:SetMaterial(g) c:SetMaterial(g)
mat_operation(g,table.unpack(operation_params)) mat_operation(g,table.unpack(operation_params))
g:DeleteGroup()
end end
end end
--send to deck of contact fusion --send to deck of contact fusion
...@@ -1733,13 +1754,29 @@ function Auxiliary.AddRitualProcUltimate(c,filter,level_function,greater_or_equa ...@@ -1733,13 +1754,29 @@ function Auxiliary.AddRitualProcUltimate(c,filter,level_function,greater_or_equa
end end
return e1 return e1
end end
---@param g Group
---@param c Card
---@param lv integer
---@return boolean
function Auxiliary.RitualCheckGreater(g,c,lv) function Auxiliary.RitualCheckGreater(g,c,lv)
Duel.SetSelectedCard(g) Duel.SetSelectedCard(g)
return g:CheckWithSumGreater(Card.GetRitualLevel,lv,c) return g:CheckWithSumGreater(Card.GetRitualLevel,lv,c)
end end
---@param g Group
---@param c Card
---@param lv integer
---@return boolean
function Auxiliary.RitualCheckEqual(g,c,lv) function Auxiliary.RitualCheckEqual(g,c,lv)
return g:CheckWithSumEqual(Card.GetRitualLevel,lv,#g,#g,c) return g:CheckWithSumEqual(Card.GetRitualLevel,lv,#g,#g,c)
end end
---@param g Group
---@param tp integer
---@param c Card
---@param lv integer
---@param greater_or_equal string
---|"'Greater'"
---|"'Equal'"
---@return boolean
function Auxiliary.RitualCheck(g,tp,c,lv,greater_or_equal) function Auxiliary.RitualCheck(g,tp,c,lv,greater_or_equal)
return Auxiliary["RitualCheck"..greater_or_equal](g,c,lv) and Duel.GetMZoneCount(tp,g,tp)>0 and (not c.mat_group_check or c.mat_group_check(g,tp)) return Auxiliary["RitualCheck"..greater_or_equal](g,c,lv) and Duel.GetMZoneCount(tp,g,tp)>0 and (not c.mat_group_check or c.mat_group_check(g,tp))
and (not Auxiliary.RCheckAdditional or Auxiliary.RCheckAdditional(tp,g,c)) and (not Auxiliary.RCheckAdditional or Auxiliary.RCheckAdditional(tp,g,c))
......
...@@ -729,6 +729,11 @@ function Auxiliary.MaterialReasonCardReg(e,tp,eg,ep,ev,re,r,rp) ...@@ -729,6 +729,11 @@ function Auxiliary.MaterialReasonCardReg(e,tp,eg,ep,ev,re,r,rp)
local te=e:GetLabelObject() local te=e:GetLabelObject()
c:GetReasonCard():CreateEffectRelation(te) c:GetReasonCard():CreateEffectRelation(te)
end end
--the player tp has token on the field
function Auxiliary.tkfcon(e,tp)
if tp==nil and e~=nil then tp=e:GetHandlerPlayer() end
return Duel.IsExistingMatchingCard(Card.IsType,tp,LOCATION_ONFIELD,0,1,nil,TYPE_TOKEN)
end
--effects inflicting damage to tp --effects inflicting damage to tp
function Auxiliary.damcon1(e,tp,eg,ep,ev,re,r,rp) function Auxiliary.damcon1(e,tp,eg,ep,ev,re,r,rp)
local e1=Duel.IsPlayerAffectedByEffect(tp,EFFECT_REVERSE_DAMAGE) local e1=Duel.IsPlayerAffectedByEffect(tp,EFFECT_REVERSE_DAMAGE)
...@@ -1229,6 +1234,42 @@ function Group.SelectSubGroupEach(g,tp,checks,cancelable,f,...) ...@@ -1229,6 +1234,42 @@ function Group.SelectSubGroupEach(g,tp,checks,cancelable,f,...)
return nil return nil
end end
end end
--for effects that player usually select card from field, avoid showing panel
function Auxiliary.SelectCardFromFieldFirst(tp,f,player,s,o,min,max,ex,...)
local ext_params={...}
local g=Duel.GetMatchingGroup(f,player,s,o,ex,ext_params)
local fg=g:Filter(Card.IsOnField,nil)
g:Sub(fg)
if #fg>=min and #g>0 then
local last_hint=Duel.GetLastSelectHint(tp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FIELD_FIRST)
local sg=fg:CancelableSelect(tp,min,max,nil)
if sg then
return sg
else
Duel.Hint(HINT_SELECTMSG,tp,last_hint)
end
end
return Duel.SelectMatchingCard(tp,f,player,s,o,min,max,ex,ext_params)
end
function Auxiliary.SelectTargetFromFieldFirst(tp,f,player,s,o,min,max,ex,...)
local ext_params={...}
local g=Duel.GetMatchingGroup(f,player,s,o,ex,ext_params):Filter(Card.IsCanBeEffectTarget,nil)
local fg=g:Filter(Card.IsOnField,nil)
g:Sub(fg)
if #fg>=min and #g>0 then
local last_hint=Duel.GetLastSelectHint(tp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FIELD_FIRST)
local sg=fg:CancelableSelect(tp,min,max,nil)
if sg then
Duel.SetTargetCard(sg)
return sg
else
Duel.Hint(HINT_SELECTMSG,tp,last_hint)
end
end
return Duel.SelectTarget(tp,f,player,s,o,min,max,ex,ext_params)
end
--condition of "negate activation and banish" --condition of "negate activation and banish"
function Auxiliary.nbcon(tp,re) function Auxiliary.nbcon(tp,re)
local rc=re:GetHandler() local rc=re:GetHandler()
......
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