Commit 90038180 authored by mercury233's avatar mercury233

fix

parent 44798cc9
......@@ -75,7 +75,7 @@ function c100416035.sprop(e,tp,eg,ep,ev,re,r,rp,c)
end
function c100416035.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(tp) and chkc:IsOnField() end
if chk==0 then return Duel.IsExistingTarget(aux.TRUE,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,2,e:GetHandler()) end
if chk==0 then return Duel.IsExistingTarget(aux.TRUE,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,e:GetHandler()) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local dg=Duel.SelectTarget(tp,aux.TRUE,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,2,e:GetHandler())
Duel.SetOperationInfo(0,CATEGORY_DESTROY,dg,dg:GetCount(),0,0)
......
......@@ -35,7 +35,7 @@ function c100416038.initial_effect(c)
e4:SetCountLimit(1)
e4:SetCondition(c100416038.tkccon)
e4:SetCost(c100416038.tkccost)
e4:SetTarget(c100416038.tkctg)
e4:SetTarget(c100416038.tkctg)
e4:SetOperation(c100416038.tkcop)
c:RegisterEffect(e4)
end
......
......@@ -5,5 +5,5 @@ function c101103086.initial_effect(c)
aux.AddRitualProcEqual2(c,c101103086.ritual_filter)
end
function c101103086.ritual_filter(c)
return c:IsType(TYPE_RITUAL) and c:IsAttribute(ATTRIBUTE_WIND)
return c:IsType(TYPE_RITUAL) and c:IsAttribute(ATTRIBUTE_WIND)
end
......@@ -53,7 +53,7 @@ function c101103093.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.ConfirmCards(1-tp,g)
Duel.BreakEffect()
local sg=Duel.GetMatchingGroup(c101103093.atkfilter,tp,LOCATION_MZONE,0,nil)
local tc=sg:GetFirst()
local tc=sg:GetFirst()
for tc in aux.Next(sg) do
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
......
......@@ -58,7 +58,7 @@ function c101103095.tgop(e,tp,eg,ep,ev,re,r,rp)
if #g>0 and Duel.SendtoGrave(g,REASON_EFFECT) then
Duel.BreakEffect()
local sg=Duel.GetMatchingGroup(c101103095.atkfilter,tp,LOCATION_MZONE,0,nil)
local tc=sg:GetFirst()
local tc=sg:GetFirst()
for tc in aux.Next(sg) do
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
......
......@@ -56,7 +56,7 @@ function c101103096.spop(e,tp,eg,ep,ev,re,r,rp)
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)
end
local g=Duel.GetMatchingGroup(c101103096.atkfilter,tp,LOCATION_MZONE,0,nil)
local tc=g:GetFirst()
local tc=g:GetFirst()
for tc in aux.Next(g) do
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
......
......@@ -44,7 +44,7 @@ function c101103097.draop(e,tp,eg,ep,ev,re,r,rp)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
c:RegisterEffect(e1)
local g=Duel.GetMatchingGroup(c101103097.atkfilter,tp,LOCATION_MZONE,0,nil)
local tc=g:GetFirst()
local tc=g:GetFirst()
for tc in aux.Next(g) do
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
......
......@@ -25,12 +25,12 @@ function c101104005.initial_effect(c)
e2:SetOperation(c101104005.ovop)
c:RegisterEffect(e2)
end
function c101104005.spfilter(c,e,tp)
return c:IsSetCard(0x155) and not c:IsCode(101104005) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE)
end
function c101104005.spcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsPreviousLocation(LOCATION_HAND+LOCATION_DECK)
end
function c101104005.spfilter(c,e,tp)
return c:IsSetCard(0x155) and not c:IsCode(101104005) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE)
end
function c101104005.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and c101104005.spfilter(chkc,e,tp) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
......
......@@ -5,6 +5,7 @@ function c101104006.initial_effect(c)
--special summon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(101104006,0))
1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_CHAINING)
e1:SetProperty(EFFECT_FLAG_DELAY)
......@@ -65,7 +66,7 @@ function c101104006.eqfilter2(c)
end
function c101104006.eqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return eg:IsContains(chkc) and c101104006.eqfilter1(chkc,e,tp) end
if chk==0 then return eg:IsExists(c101104006.eqfilter1,1,nil,e,tp) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0 and eg:IsExists(c101104006.eqfilter1,1,nil,e,tp) end
local g=eg:Clone()
if #eg>1 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
......
......@@ -47,7 +47,9 @@ function c101104009.srop(e,tp,eg,ep,ev,re,r,rp)
end
end
function c101104009.cfilter(c,tp)
return c:IsPreviousPosition(POS_FACEUP) and c:GetPreviousControler()==tp and c:IsPreviousLocation(LOCATION_MZONE) and (c:IsPreviousSetCard(0x1123) or c:GetPreviousRaceOnField()&RACE_PLANT~=0 and c:GetPreviousTypeOnField()&TYPE_SYNCHRO~=0) and (c:IsReason(REASON_BATTLE) or c:IsReason(REASON_EFFECT) and c:GetReasonPlayer()==1-tp)
return c:IsPreviousPosition(POS_FACEUP) and c:GetPreviousControler()==tp and c:IsPreviousLocation(LOCATION_MZONE)
and (c:IsPreviousSetCard(0x1123) or c:GetPreviousRaceOnField()&RACE_PLANT~=0 and c:GetPreviousTypeOnField()&TYPE_SYNCHRO~=0)
and (c:IsReason(REASON_BATTLE) or c:IsReason(REASON_EFFECT) and c:GetReasonPlayer()==1-tp)
end
function c101104009.thcon(e,tp,eg,ep,ev,re,r,rp)
return not eg:IsContains(e:GetHandler()) and eg:IsExists(c101104009.cfilter,1,nil,tp)
......
......@@ -23,7 +23,7 @@ function c101104011.initial_effect(c)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetRange(LOCATION_MZONE+LOCATION_GRAVE)
e2:SetCountLimit(1,101104111)
e2:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e2:SetHintTiming(0,TIMINGS_CHECK_MONSTER)
e2:SetCondition(c101104011.discon)
e2:SetCost(aux.bfgcost)
e2:SetTarget(c101104011.distg)
......@@ -57,7 +57,7 @@ end
function c101104011.distg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsOnField() and chkc:IsControler(1-tp) and aux.disfilter1(chkc) end
if chk==0 then return Duel.IsExistingTarget(aux.disfilter1,tp,0,LOCATION_ONFIELD,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DISABLE)
local g=Duel.SelectTarget(tp,aux.disfilter1,tp,0,LOCATION_ONFIELD,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_DISABLE,g,1,0,0)
end
......
......@@ -18,7 +18,6 @@ function c101104013.initial_effect(c)
e2:SetDescription(aux.Stringid(101104013,1))
e2:SetCategory(CATEGORY_EQUIP)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
e2:SetRange(LOCATION_GRAVE)
e2:SetCountLimit(1,101104013+100)
......@@ -29,7 +28,7 @@ function c101104013.initial_effect(c)
end
function c101104013.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsReleasable() end
Duel.Release(e:GetHandler(),REASON_COST+REASON_RELEASE)
Duel.Release(e:GetHandler(),REASON_COST)
end
function c101104013.spfilter(c,e,tp)
return c:IsSetCard(0x88) and not c:IsCode(101104013) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE)
......@@ -53,7 +52,7 @@ function c101104013.spop(e,tp,eg,ep,ev,re,r,rp)
end
end
function c101104013.eqfilter(c,tp)
return c:IsControler(tp) and c:IsSetCard(0x88) and c:IsSummonType(SUMMON_TYPE_XYZ)
return c:IsSummonPlayer(tp) and c:IsSetCard(0x88) and c:IsType(TYPE_XYZ) and c:IsSummonType(SUMMON_TYPE_XYZ)
end
function c101104013.eqcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c101104013.eqfilter,1,nil,tp)
......@@ -64,11 +63,11 @@ function c101104013.eqtg(e,tp,eg,ep,ev,re,r,rp,chk)
if #eg==1 then
tg=eg:Clone()
else
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
tg=eg:FilterSelect(tp,c101104013.eqfilter,1,1,nil,e,tp)
end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
Duel.SetTargetCard(tg)
Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,e:GetHandler(),1,0,0)
end
function c101104013.eqop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
......@@ -91,6 +90,7 @@ function c101104013.eqop(e,tp,eg,ep,ev,re,r,rp)
e2:SetType(EFFECT_TYPE_EQUIP)
e2:SetCode(EFFECT_BATTLE_DESTROY_REDIRECT)
e2:SetValue(LOCATION_REMOVED)
e2:SetReset(RESET_EVENT+RESETS_STANDARD)
c:RegisterEffect(e2)
end
function c101104013.eqlimit(e,c)
......
......@@ -27,7 +27,7 @@ function c101104015.initial_effect(c)
c:RegisterEffect(e3)
end
function c101104015.spfilter(c,e,tp)
return c:IsSetCard(0x156) and not c:IsCode(101104015)
return c:IsSetCard(0x156) and not c:IsCode(101104015)
and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_ATTACK)
end
function c101104015.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
......
--ジーナの惑魔
--ジーナの惑魔
--Scripted by mallu11
function c101104016.initial_effect(c)
......
......@@ -16,6 +16,7 @@ function c101104018.initial_effect(c)
--special summon
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(101104018,1))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY)
e2:SetCode(EVENT_TO_GRAVE)
......@@ -64,7 +65,7 @@ function c101104018.spfilter(c,e,tp)
return c:IsSetCard(0x13f) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE)
end
function c101104018.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and c101104018.spfilter(chkc,e,tp) end
if chkc then return chkc:IsLocation(LOCATION_SZONE) and chkc:IsControler(tp) and c101104018.spfilter(chkc,e,tp) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingTarget(c101104018.spfilter,tp,LOCATION_SZONE,0,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
......
......@@ -5,7 +5,7 @@ function c101104019.initial_effect(c)
--spsummon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(101104019,0))
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SPECIAL_SUMMON)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,101104019)
......
......@@ -18,7 +18,7 @@ function c101104023.initial_effect(c)
--tribute summon
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(101104023,1))
e3:SetCategory(CATEGORY_TOGRAVE)
e3:SetCategory(CATEGORY_SUMMON)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e3:SetProperty(EFFECT_FLAG_DELAY)
e3:SetCode(EVENT_TO_HAND)
......
......@@ -17,7 +17,6 @@ function c101104024.initial_effect(c)
e2:SetCategory(CATEGORY_TODECK)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e2:SetCode(EVENT_FLIP_SUMMON_SUCCESS)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCountLimit(1,101104024)
e2:SetTarget(c101104024.tdtg)
e2:SetOperation(c101104024.tdop)
......@@ -48,8 +47,8 @@ function c101104024.posop(e,tp,eg,ep,ev,re,r,rp)
end
end
function c101104024.tdtg(e,tp,eg,ep,ev,re,r,rp,chk)
local g=Duel.GetMatchingGroup(Card.IsAbleToDeck,tp,0,LOCATION_MZONE,nil)
if chk==0 then return true end
local g=Duel.GetMatchingGroup(Card.IsAbleToDeck,tp,0,LOCATION_MZONE,nil)
Duel.SetOperationInfo(0,CATEGORY_TODECK,g,g:GetCount(),0,0)
end
function c101104024.tdop(e,tp,eg,ep,ev,re,r,rp)
......
......@@ -11,7 +11,6 @@ function c101104025.initial_effect(c)
--option
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(101104025,0))
e1:SetCategory(CATEGORY_DESTROY)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCode(EVENT_SUMMON_SUCCESS)
......@@ -26,9 +25,6 @@ function c101104025.initial_effect(c)
e2:SetLabelObject(e1)
c:RegisterEffect(e2)
end
function c101104025.opcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_ADVANCE) and (e:GetLabel()==1 or e:GetLabel()==2)
end
function c101104025.chkfilter(c,rac,att)
return c:IsRace(rac) and c:IsAttribute(att)
end
......@@ -43,6 +39,9 @@ function c101104025.valcheck(e,c)
end
e:GetLabelObject():SetLabel(label)
end
function c101104025.opcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_ADVANCE) and e:GetLabel()>0
end
function c101104025.thfilter(c)
return (c:IsRace(RACE_FAIRY) and c:IsAttribute(ATTRIBUTE_LIGHT)) or (c:IsRace(RACE_FIEND) and c:IsAttribute(ATTRIBUTE_DARK)) and c:IsAbleToHand()
end
......
......@@ -78,7 +78,7 @@ function c101104027.reptg(e,tp,eg,ep,ev,re,r,rp,chk)
if Duel.SelectEffectYesNo(tp,e:GetHandler(),96) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,c101104027.repfilter,tp,LOCATION_GRAVE,0,1,1,nil)
Duel.Remove(g,POS_FACEUP,REASON_EFFECT)
Duel.Remove(g,POS_FACEUP,REASON_EFFECT+REASON_REPLACE)
return true
else return false end
end
......@@ -13,26 +13,28 @@ function c101104029.initial_effect(c)
e1:SetOperation(c101104029.activate)
c:RegisterEffect(e1)
end
function c101104029.filter1(c)
function c101104029.filter1(c,tp)
return c:IsFaceup() and c:IsRace(RACE_REPTILE)
and Duel.IsExistingTarget(c101104029.filter2,tp,0,LOCATION_MZONE,1,nil,c:IsCanTurnSet())
end
function c101104029.filter2(c)
return c:IsFaceup() and (c:IsCanTurnSet() or c:GetAttack()>0)
function c101104029.filter2(c,check)
return c:IsFaceup() and (check and c:IsCanTurnSet() or c:GetAttack()>0)
end
function c101104029.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return false end
if chk==0 then return Duel.IsExistingTarget(c101104029.filter1,tp,LOCATION_MZONE,0,1,nil)
and Duel.IsExistingTarget(c101104029.filter2,tp,0,LOCATION_MZONE,1,nil) end
if chk==0 then return Duel.IsExistingTarget(c101104029.filter1,tp,LOCATION_MZONE,0,1,nil,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
local g1=Duel.SelectTarget(tp,c101104029.filter1,tp,LOCATION_MZONE,0,1,1,nil)
e:SetLabelObject(g1:GetFirst())
local tc1=g1:GetFirst()
local check=tc1:IsCanTurnSet()
e:SetLabelObject(tc1)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
local g2=Duel.SelectTarget(tp,c101104029.filter2,tp,0,LOCATION_MZONE,1,1,nil)
local g2=Duel.SelectTarget(tp,c101104029.filter2,tp,0,LOCATION_MZONE,1,1,nil,check)
local sel
local tc2=g2:GetFirst()
if tc2:IsAttack(0) then
sel=Duel.SelectOption(tp,aux.Stringid(101104029,0))
elseif not tc2:IsCanTurnSet() then
elseif not (check and tc2:IsCanTurnSet()) then
sel=Duel.SelectOption(tp,aux.Stringid(101104029,1))+1
else
sel=Duel.SelectOption(tp,aux.Stringid(101104029,0),aux.Stringid(101104029,1))
......@@ -57,7 +59,7 @@ function c101104029.activate(e,tp,eg,ep,ev,re,r,rp)
local tc1=e:GetLabelObject()
local tc2=g:GetFirst()
if tc2==tc1 then tc2=g:GetNext() end
if tc1:IsRelateToEffect(e) and Duel.Destroy(tc1,REASON_EFFECT)~=0 and tc2:IsRelateToEffect(e) then
if tc1:IsRelateToEffect(e) and Duel.Destroy(tc1,REASON_EFFECT)~=0 and tc2 and tc2:IsRelateToEffect(e) then
local e1=Effect.CreateEffect(tc2)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_SET_ATTACK_FINAL)
......
......@@ -66,8 +66,8 @@ end
function c101104030.cfilter(c)
return c:IsFacedown() or not c:IsType(TYPE_PENDULUM)
end
function c101104030.sccon(e,tp,eg,ep,ev,re,r,rp)
return not Duel.IsExistingMatchingCard(c101104030.cfilter,tp,LOCATION_MZONE,0,1,nil)
function c101104030.sccon(e)
return not Duel.IsExistingMatchingCard(c101104030.cfilter,e:GetHandlerPlayer(),LOCATION_MZONE,0,1,nil)
end
function c101104030.spcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()~=tp
......
......@@ -17,7 +17,7 @@ function c101104031.initial_effect(c)
e2:SetDescription(aux.Stringid(101104031,0))
e2:SetCategory(CATEGORY_COUNTER+CATEGORY_TOKEN)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
e2:SetCode(EVENT_TO_GRAVE)
e2:SetCode(EVENT_TO_GRAVE)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,101104031)
e2:SetCondition(c101104031.tkcon)
......@@ -41,9 +41,6 @@ function c101104031.tktg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsCanAddCounter(0x59,1) end
Duel.SetOperationInfo(0,CATEGORY_COUNTER,nil,1,0,0)
end
function c101104031.tkfilter(c)
return c:IsFaceup() and c:IsType(TYPE_TOKEN)
end
function c101104031.tkop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
......
......@@ -38,7 +38,7 @@ function c101104033.initial_effect(c)
c:RegisterEffect(e3)
end
function c101104033.condition(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_FUSION) and Duel.GetCurrentPhase()&PHASE_DAMAGE==0 and Duel.GetCurrentPhase()&PHASE_DAMAGE_CAL==0
return e:GetHandler():IsSummonType(SUMMON_TYPE_FUSION) and Duel.GetCurrentPhase()&(PHASE_DAMAGE+PHASE_DAMAGE_CAL)==0
end
function c101104033.filter1(c,e)
return c:IsAbleToRemove() and not c:IsImmuneToEffect(e)
......
......@@ -31,7 +31,7 @@ function c101104034.initial_effect(c)
e3:SetCountLimit(1,101104034)
e3:SetTarget(c101104034.remtg)
e3:SetOperation(c101104034.remop)
c:RegisterEffect(e3)
c:RegisterEffect(e3)
end
function c101104034.atkval(e)
return Duel.GetFieldGroupCount(e:GetHandlerPlayer(),LOCATION_REMOVED,0)*-100
......
......@@ -83,11 +83,11 @@ end
function c101104035.discon(e,tp,eg,ep,ev,re,r,rp)
if e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED) or not Duel.IsChainNegatable(ev) or ep==tp then return false end
local ex,tg,tc=Duel.GetOperationInfo(ev,CATEGORY_DESTROY)
return ex and tg~=nil and tc>0
return ex and (tg~=nil or tc>0)
end
function c101104035.discost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsReleasable() end
Duel.Release(e:GetHandler(),REASON_EFFECT)
Duel.Release(e:GetHandler(),REASON_COST)
end
function c101104035.distg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
......@@ -103,7 +103,9 @@ function c101104035.spfilter(c,e,tp)
end
end
function c101104035.disop(e,tp,eg,ep,ev,re,r,rp)
if Duel.NegateActivation(ev) and Duel.IsExistingMatchingCard(aux.NecroValleyFilter(c101104035.spfilter),tp,LOCATION_EXTRA+LOCATION_GRAVE,0,1,nil,e,tp) and Duel.SelectYesNo(tp,aux.Stringid(101104035,3)) then
if Duel.NegateActivation(ev)
and Duel.IsExistingMatchingCard(aux.NecroValleyFilter(c101104035.spfilter),tp,LOCATION_EXTRA+LOCATION_GRAVE,0,1,nil,e,tp)
and Duel.SelectYesNo(tp,aux.Stringid(101104035,3)) then
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(c101104035.spfilter),tp,LOCATION_EXTRA+LOCATION_GRAVE,0,1,1,nil,e,tp)
......
......@@ -6,7 +6,7 @@ function c101104037.initial_effect(c)
c:EnableReviveLimit()
--destroy
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_DESTROY)
e1:SetCategory(CATEGORY_DESTROY+CATEGORY_DAMAGE)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_CHAINING)
e1:SetRange(LOCATION_MZONE)
......@@ -59,6 +59,7 @@ end
function c101104037.spop(e,tp,eg,ep,ev,re,r,rp)
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
if ft<=0 then return end
if ft>3 then ft=3 end
if Duel.IsPlayerAffectedByEffect(tp,59822133) then ft=1 end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c101104037.spfilter,tp,LOCATION_GRAVE,0,1,ft,nil,e,tp)
......
......@@ -11,7 +11,6 @@ function c101104038.initial_effect(c)
e1:SetDescription(aux.Stringid(101104038,0))
e1:SetCategory(CATEGORY_DAMAGE)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCode(EVENT_DESTROYED)
e1:SetCondition(c101104038.damcon)
e1:SetTarget(c101104038.damtg)
......@@ -59,8 +58,7 @@ function c101104038.destg(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,PLAYER_ALL,2000)
end
function c101104038.desop(e,tp,eg,ep,ev,re,r,rp)
if e:GetHandler():IsRelateToEffect(e) then
Duel.Destroy(e:GetHandler(),REASON_EFFECT)
if e:GetHandler():IsRelateToEffect(e) and Duel.Destroy(e:GetHandler(),REASON_EFFECT)>0 then
Duel.Damage(tp,2000,REASON_EFFECT)
Duel.BreakEffect()
Duel.Damage(1-tp,2000,REASON_EFFECT)
......
......@@ -63,7 +63,7 @@ function c101104041.rmop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsFaceup() and c:IsRelateToEffect(e) then
local ct=c:GetOverlayCount()
Duel.Remove(c,0,REASON_EFFECT+REASON_TEMPORARY)
Duel.Remove(c,POS_FACEUP,REASON_EFFECT+REASON_TEMPORARY)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_PHASE+PHASE_END)
......
......@@ -17,16 +17,17 @@ function c101104042.initial_effect(c)
e1:SetOperation(c101104042.spop)
c:RegisterEffect(e1)
--disable
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(101104042,1))
e3:SetCategory(CATEGORY_DISABLE)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetRange(LOCATION_SZONE)
e3:SetCountLimit(1,101104042+100)
e3:SetCondition(c101104042.discon)
e3:SetTarget(c101104042.distg)
e3:SetOperation(c101104042.disop)
c:RegisterEffect(e3)
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(101104042,1))
e2:SetCategory(CATEGORY_DISABLE)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_SZONE)
e2:SetCountLimit(1,101104042+100)
e2:SetCondition(c101104042.discon)
e2:SetTarget(c101104042.distg)
e2:SetOperation(c101104042.disop)
c:RegisterEffect(e2)
end
function c101104042.mfilter(c,xyzc)
return c:IsXyzType(TYPE_MONSTER) and c:IsXyzLevel(xyzc,4) and c:IsRace(RACE_SPELLCASTER)
......@@ -54,14 +55,14 @@ function c101104042.spop(e,tp,eg,ep,ev,re,r,rp)
if #g>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e2:SetTargetRange(1,0)
e2:SetTarget(c101104042.splimit)
e2:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e2,tp)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetTargetRange(1,0)
e1:SetTarget(c101104042.splimit)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
function c101104042.splimit(e,c)
return not c:IsSetCard(0x150) and c:IsLocation(LOCATION_EXTRA)
......
......@@ -62,15 +62,18 @@ function c101104045.seqtg(e,tp,eg,ep,ev,re,r,rp,chk)
end
function c101104045.seqop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not (c:IsRelateToEffect(e) and c:IsFaceup() and c:IsControler(tp)) then return end
local zone=bit.band(e:GetHandler():GetLinkedZone(),0x1f)
if not (c:IsRelateToEffect(e) and c:IsFaceup()) then return end
local zone=bit.band(e:GetHandler():GetLinkedZone(tp),0x1f)
if Duel.GetLocationCount(tp,LOCATION_MZONE,PLAYER_NONE,0,zone)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOZONE)
local flag=bit.bxor(zone,0xff)
local s=Duel.SelectDisableField(tp,1,LOCATION_MZONE,0,flag)
local s=zone
if s&(s-1)~=0 then
local flag=bit.bxor(zone,0xff)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOZONE)
s=Duel.SelectDisableField(tp,1,LOCATION_MZONE,0,flag)
end
local nseq=math.log(s,2)
Duel.MoveSequence(c,nseq)
if c:GetSequence()==nseq and Duel.SelectYesNo(tp,aux.Stringid(101104045,2)) then
if c:GetSequence()==nseq and Duel.SelectEffectYesNo(tp,c,aux.Stringid(101104045,2)) then
Duel.BreakEffect()
local attr=Duel.AnnounceAttribute(tp,1,0xff-c:GetAttribute())
local e1=Effect.CreateEffect(c)
......
--クラリアの惑魔
--クラリアの惑魔
--Scripted by mallu11
function c101104046.initial_effect(c)
......@@ -25,6 +25,7 @@ function c101104046.initial_effect(c)
--special summon
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(101104046,0))
e3:SetCategory(CATEGORY_SPECIAL_SUMMON)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_PHASE+PHASE_END)
e3:SetProperty(EFFECT_FLAG_CARD_TARGET)
......
......@@ -76,7 +76,7 @@ function c101104047.repfilter(c,tp)
end
function c101104047.desreptg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return eg:IsExists(c101104047.repfilter,1,c,tp) and c:IsAbleToRemove() and not c:IsStatus(STATUS_DESTROY_CONFIRMED) end
if chk==0 then return eg:IsExists(c101104047.repfilter,1,c,tp) and c:IsAbleToRemove() and not c:IsStatus(STATUS_DESTROY_CONFIRMED) end
return Duel.SelectEffectYesNo(tp,c,96)
end
function c101104047.desrepval(e,c)
......
......@@ -10,7 +10,6 @@ function c101104054.initial_effect(c)
--activate limit
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(101104054,0))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET)
e2:SetRange(LOCATION_SZONE)
......
......@@ -4,9 +4,11 @@
function c101104057.initial_effect(c)
--tohand and spsummon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(101104057,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOHAND)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_CHAINING)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCondition(c101104057.spcon)
e1:SetTarget(c101104057.sptg)
e1:SetOperation(c101104057.spop)
......
......@@ -8,7 +8,7 @@ function c101104059.initial_effect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_MAIN_END)
e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e1:SetCountLimit(1,101104059)
e1:SetTarget(c101104059.sptg1)
e1:SetOperation(c101104059.spop1)
......@@ -17,7 +17,7 @@ function c101104059.initial_effect(c)
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_TO_GRAVE)
e2:SetCode(EVENT_DESTROYED)
e2:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET)
e2:SetCountLimit(1,101104059+100)
e2:SetCondition(c101104059.spcon2)
......@@ -43,7 +43,6 @@ end
function c101104059.spcon2(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsPreviousLocation(LOCATION_SZONE) and c:IsPreviousPosition(POS_FACEDOWN)
and c:IsReason(REASON_DESTROY)
end
function c101104059.spfilter2(c,e,tp)
return (c:IsFaceup() or c:IsLocation(LOCATION_GRAVE)) and (c:IsCode(73580471) or aux.IsCodeListed(c,73580471)) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
......
......@@ -75,7 +75,7 @@ end
function c101104060.damop(e,tp,eg,ep,ev,re,r,rp)
Duel.Damage(tp,2300,REASON_EFFECT)
end
function c101104060.actlimit(e,re,rp)
function c101104060.actlimit(e,re,rp)
local rc=re:GetHandler()
return re:IsActiveType(TYPE_MONSTER) and not rc:IsRace(RACE_CYBERSE)
end
......@@ -34,6 +34,7 @@ function c101104062.initial_effect(c)
e4:SetDescription(aux.Stringid(101104062,1))
e4:SetCategory(CATEGORY_SPECIAL_SUMMON)
e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e4:SetProperty(EFFECT_FLAG_CARD_TARGET)
e4:SetRange(LOCATION_SZONE)
e4:SetCode(EVENT_PHASE+PHASE_END)
e4:SetCondition(c101104062.spcon)
......@@ -50,7 +51,8 @@ function c101104062.indtg(e,c)
return c:IsRace(RACE_BEASTWARRIOR) and c:IsSetCard(0x88)
end
function c101104062.costfilter(c)
return c:IsSetCard(0x88) and c:IsAbleToGraveAsCost()
return c:IsType(TYPE_MONSTER) and c:IsSetCard(0x88) and c:IsAbleToGraveAsCost()
and (c:IsFaceup() or c:IsLocation(LOCATION_HAND))
end
function c101104062.discost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c101104062.costfilter,tp,LOCATION_MZONE+LOCATION_HAND,0,1,nil) end
......@@ -58,20 +60,17 @@ function c101104062.discost(e,tp,eg,ep,ev,re,r,rp,chk)
local g=Duel.SelectMatchingCard(tp,c101104062.costfilter,tp,LOCATION_MZONE+LOCATION_HAND,0,1,1,nil)
Duel.SendtoGrave(g,REASON_COST)
end
function c101104062.disfilter(c)
return c:IsFaceup() and not c:IsDisabled()
end
function c101104062.distg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(1-tp) and chkc:IsLocation(LOCATION_ONFIELD) and c101104062.disfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c101104062.disfilter,tp,0,LOCATION_ONFIELD,1,nil) end
if chkc then return chkc:IsControler(1-tp) and chkc:IsLocation(LOCATION_ONFIELD) and aux.disfilter1(chkc) end
if chk==0 then return Duel.IsExistingTarget(aux.disfilter1,tp,0,LOCATION_ONFIELD,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DISABLE)
local g=Duel.SelectTarget(tp,c101104062.disfilter,tp,0,LOCATION_ONFIELD,1,1,nil)
local g=Duel.SelectTarget(tp,aux.disfilter1,tp,0,LOCATION_ONFIELD,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_DISABLE,g,1,0,0)
end
function c101104062.disop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if tc:IsFaceup() and tc:IsRelateToEffect(e) and not tc:IsDisabled() then
if ((tc:IsFaceup() and not tc:IsDisabled()) or tc:IsType(TYPE_TRAPMONSTER)) and tc:IsRelateToEffect(e) then
Duel.NegateRelatedChain(tc,RESET_TURN_SET)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
......@@ -84,6 +83,14 @@ function c101104062.disop(e,tp,eg,ep,ev,re,r,rp)
e2:SetValue(RESET_TURN_SET)
e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e2)
if tc:IsType(TYPE_TRAPMONSTER) then
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e3:SetCode(EFFECT_DISABLE_TRAPMONSTER)
e3:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e3)
end
end
end
function c101104062.spcon(e,tp,eg,ep,ev,re,r,rp)
......
......@@ -26,11 +26,13 @@ function c101104064.postg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then return Duel.IsExistingTarget(c101104064.posfilter,tp,LOCATION_MZONE,LOCATION_MZONE,2,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_POSCHANGE)
local g=Duel.SelectTarget(tp,c101104064.posfilter,tp,LOCATION_MZONE,LOCATION_MZONE,2,2,nil)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_POSCHANGE)
Duel.SetOperationInfo(0,CATEGORY_POSITION,g,2,0,0)
end
function c101104064.filter(c,e)
return c:IsRelateToEffect(e) and c:IsLocation(LOCATION_MZONE)
end
function c101104064.posop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS):Filter(Card.IsRelateToEffect,nil,e)
local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS):Filter(c101104064.filter,nil,e)
if g:GetCount()>0 then
Duel.ChangePosition(g,POS_FACEDOWN_DEFENSE)
end
......
......@@ -6,6 +6,7 @@ function c101104066.initial_effect(c)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,101104066+EFFECT_COUNT_CODE_OATH)
c:RegisterEffect(e1)
--apply
local e2=Effect.CreateEffect(c)
......@@ -13,7 +14,7 @@ function c101104066.initial_effect(c)
e2:SetRange(LOCATION_FZONE)
e2:SetProperty(EFFECT_FLAG_BOTH_SIDE)
e2:SetCountLimit(1)
e2:SetTarget(c101104066.effcon)
e2:SetCondition(c101104066.effcon)
e2:SetOperation(c101104066.effop)
c:RegisterEffect(e2)
end
......@@ -31,7 +32,7 @@ function c101104066.effop(e,tp,eg,ep,ev,re,r,rp)
e1:SetRange(LOCATION_SZONE)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
local e2=e1:Clone()
local e2=e1:Clone()
e2:SetCode(EFFECT_CANNOT_DISABLE_SUMMON)
Duel.RegisterEffect(e2,tp)
--inactivatable
......
......@@ -70,7 +70,8 @@ function c101104070.filter(c,tp)
end
function c101104070.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and c101104070.filter(chkc,tp) end
if chk==0 then return Duel.IsExistingTarget(c101104070.filter,tp,0,LOCATION_MZONE,1,nil,tp) end
if chk==0 then return e:IsHasType(EFFECT_TYPE_ACTIVATE)
and Duel.IsExistingTarget(c101104070.filter,tp,0,LOCATION_MZONE,1,nil,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
local g=Duel.SelectTarget(tp,c101104070.filter,tp,0,LOCATION_MZONE,1,1,nil,tp)
Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,0,0)
......
......@@ -15,7 +15,7 @@ function c101104077.initial_effect(c)
--banish replace
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(101104077)
e2:SetCode(55049722)
e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e2:SetRange(LOCATION_GRAVE)
e2:SetCountLimit(1,101104077+100)
......@@ -35,7 +35,7 @@ function c101104077.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local ct=g:GetClassCount(Card.GetCode)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND)
local sg=Duel.SelectTarget(tp,c101104077.thfilter,tp,0,LOCATION_ONFIELD,1,ct,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,sg,sg:GetCount(),0,0)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,sg,sg:GetCount(),0,0)
end
function c101104077.activate(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS):Filter(Card.IsRelateToEffect,nil,e)
......
......@@ -4,8 +4,10 @@
function c101104078.initial_effect(c)
--to hand
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOHAND)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCountLimit(1,101104078+EFFECT_COUNT_CODE_OATH)
e1:SetCost(c101104078.cost)
e1:SetTarget(c101104078.target)
......
......@@ -31,13 +31,6 @@ function c101104205.initial_effect(c)
e3:SetTarget(c101104205.eqtg)
e3:SetOperation(c101104205.eqop)
c:RegisterEffect(e3)
--atkup
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_EQUIP)
e0:SetCode(EFFECT_UPDATE_ATTACK)
e0:SetValue(3000)
e0:SetCondition(c101104205.atkcon)
c:RegisterEffect(e0)
--special summon
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(101104205,2))
......@@ -50,10 +43,6 @@ function c101104205.initial_effect(c)
e4:SetOperation(c101104205.spop)
c:RegisterEffect(e4)
end
function c101104205.atkcon(e)
local c=e:GetHandler()
return c:GetFlagEffect(101104205)>0 or c:GetFlagEffect(101104204)>0
end
function c101104205.thcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end
e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST)
......@@ -104,7 +93,12 @@ function c101104205.equip_monster(c,tp,tc)
e1:SetValue(c101104205.eqlimit)
e1:SetLabelObject(tc)
c:RegisterEffect(e1)
c:RegisterFlagEffect(101104205,RESET_EVENT+RESETS_STANDARD,0,0)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_EQUIP)
e2:SetCode(EFFECT_UPDATE_ATTACK)
e2:SetValue(3000)
e2:SetReset(RESET_EVENT+RESETS_STANDARD)
c:RegisterEffect(e2)
end
function c101104205.eqlimit(e,c)
return c==e:GetLabelObject()
......
......@@ -5,7 +5,7 @@ function c101104207.initial_effect(c)
--search
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(101104207,0))
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH+CATEGORY_TODECK)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,101104207+EFFECT_COUNT_CODE_OATH)
......@@ -22,7 +22,8 @@ function c101104207.tdfilter(c)
return not c:IsPublic() and c:IsAbleToDeck()
end
function c101104207.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c101104207.filter,tp,LOCATION_DECK,0,1,nil) and Duel.IsExistingMatchingCard(c101104207.tdfilter,tp,LOCATION_HAND,0,1,nil) end
if chk==0 then return Duel.IsExistingMatchingCard(c101104207.filter,tp,LOCATION_DECK,0,1,nil)
and Duel.IsExistingMatchingCard(c101104207.tdfilter,tp,LOCATION_HAND,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c101104207.activate(e,tp,eg,ep,ev,re,r,rp)
......@@ -36,5 +37,7 @@ function c101104207.activate(e,tp,eg,ep,ev,re,r,rp)
Duel.ConfirmCards(1-tp,g1)
Duel.BreakEffect()
Duel.SendtoDeck(g,nil,2,REASON_EFFECT)
else
Duel.ShuffleHand(tp)
end
end
\ No newline at end of file
......@@ -18,6 +18,7 @@ function c101104208.initial_effect(c)
e2:SetCategory(CATEGORY_TOHAND)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_GRAVE)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetCountLimit(1,101104308)
e2:SetCost(aux.bfgcost)
e2:SetCondition(c101104208.thcon)
......@@ -39,14 +40,13 @@ function c101104208.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
end
function c101104208.activate(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if e:GetHandler():IsRelateToEffect(e) and tc:IsRelateToEffect(e) then
if tc:IsRelateToEffect(e) then
if Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and tc:IsCanBeSpecialSummoned(e,0,tp,false,false)
and not tc:IsHasEffect(EFFECT_NECRO_VALLEY)
and (not tc:IsAbleToHand() or Duel.SelectOption(tp,1190,1152)==1) then
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)
else
Duel.SendtoHand(tc,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,tc)
end
end
end
......
......@@ -31,8 +31,8 @@ function c101104209.spfilter(c,e,tp)
end
function c101104209.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c101104209.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) and Duel.IsExistingMatchingCard(aux.TRUE,tp,LOCATION_DECK,0,1,nil)
and Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)>1 end
and Duel.IsExistingMatchingCard(c101104209.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp)
and Duel.IsExistingMatchingCard(aux.TRUE,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE)
end
function c101104209.spop(e,tp,eg,ep,ev,re,r,rp)
......
......@@ -46,14 +46,14 @@ function c22180094.costfilter(c,e,tp)
if c:IsLocation(LOCATION_HAND) then
return c:IsSetCard(0x156) and c:IsAbleToRemoveAsCost()
else
return e:GetHandler():IsSetCard(0x156) and c:IsHasEffect(101104077,tp) and c:IsAbleToRemoveAsCost()
return e:GetHandler():IsSetCard(0x156) and c:IsHasEffect(55049722,tp) and c:IsAbleToRemoveAsCost()
end
end
function c22180094.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c22180094.costfilter,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local tg=Duel.SelectMatchingCard(tp,c22180094.costfilter,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,1,nil,e,tp)
local te=tg:GetFirst():IsHasEffect(101104077,tp)
local te=tg:GetFirst():IsHasEffect(55049722,tp)
if te then
te:UseCountLimit(tp)
Duel.Remove(tg,POS_FACEUP,REASON_REPLACE)
......
......@@ -38,14 +38,14 @@ function c95974848.costfilter(c,e,tp)
if c:IsLocation(LOCATION_HAND) then
return c:IsSetCard(0x156) and c:IsAbleToRemoveAsCost()
else
return e:GetHandler():IsSetCard(0x156) and c:IsHasEffect(101104077,tp) and c:IsAbleToRemoveAsCost()
return e:GetHandler():IsSetCard(0x156) and c:IsHasEffect(55049722,tp) and c:IsAbleToRemoveAsCost()
end
end
function c95974848.descost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c95974848.costfilter,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local tg=Duel.SelectMatchingCard(tp,c95974848.costfilter,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,1,nil,e,tp)
local te=tg:GetFirst():IsHasEffect(101104077,tp)
local te=tg:GetFirst():IsHasEffect(55049722,tp)
if te then
te:UseCountLimit(tp)
Duel.Remove(tg,POS_FACEUP,REASON_REPLACE)
......
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