Commit 4b4160c5 authored by mercury233's avatar mercury233

fix

parent 90c50398
......@@ -58,17 +58,30 @@ function c100270208.sptg1(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end
function c100270208.spop1(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if tc and tc:IsRelateToEffect(e) and tc:IsFaceup() and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then
local code=tc:GetCode()
local g=Duel.GetMatchingGroup(c100270208.spfilter,tp,LOCATION_EXTRA,0,nil,e,tp,code)
if #g>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg=g:Select(tp,1,1,nil)
Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP)
local sc=g:Select(tp,1,1,nil):GetFirst()
if Duel.SpecialSummonStep(sc,0,tp,tp,false,false,POS_FACEUP) then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
sc:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_DISABLE_EFFECT)
e2:SetReset(RESET_EVENT+RESETS_STANDARD)
sc:RegisterEffect(e2)
end
Duel.SpecialSummonComplete()
end
end
local e1=Effect.CreateEffect(e:GetHandler())
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
......
......@@ -82,7 +82,7 @@ end
function c100270216.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
local bc=e:GetHandler():GetBattleTarget()
local zone=Duel.GetLinkedZone(tp)&0x1f
if chk==0 then return zone~=0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE,LOCATION_REASON_TOFIELD,zone)>0
and bc:IsCanBeSpecialSummoned(e,0,tp,false,false) end
Duel.SetTargetCard(bc)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,bc,1,0,0)
......
......@@ -28,7 +28,7 @@ function c101102086.initial_effect(c)
c:RegisterEffect(e2)
end
function c101102086.spcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()~=tp
return Duel.IsEnvironment(101102092,tp,LOCATION_FZONE) and Duel.GetTurnPlayer()~=tp
and (Duel.GetCurrentPhase()==PHASE_MAIN1 or Duel.GetCurrentPhase()==PHASE_MAIN2)
end
function c101102086.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
......@@ -46,11 +46,12 @@ function c101102086.sp2costfilter(c)
return c:IsAbleToRemoveAsCost() and (c:IsFaceup() or c:IsLocation(LOCATION_HAND))
end
function c101102086.sp2cost(e,tp,eg,ep,ev,re,r,rp)
if chk==0 then return e:GetHandler():IsReleasable()
and Duel.IsExistingMatchingCard(c101102086.sp2costfilter,tp,LOCATION_HAND+LOCATION_ONFIELD,0,1,nil,e,tp) end
Duel.Release(e:GetHandler(),REASON_COST+REASON_RELEASE)
local c=e:GetHandler()
if chk==0 then return c:IsReleasable()
and Duel.IsExistingMatchingCard(c101102086.sp2costfilter,tp,LOCATION_HAND+LOCATION_ONFIELD,0,1,c) end
Duel.Release(c,REASON_COST+REASON_RELEASE)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local cost=Duel.SelectMatchingCard(tp,c101102086.sp2costfilter,tp,LOCATION_HAND+LOCATION_ONFIELD,0,1,1,nil,e,tp)
local cost=Duel.SelectMatchingCard(tp,c101102086.sp2costfilter,tp,LOCATION_HAND+LOCATION_ONFIELD,0,1,1,c)
Duel.Remove(cost,POS_FACEUP,REASON_COST)
end
function c101102086.sp2tgfilter(c,e,tp)
......
......@@ -49,7 +49,7 @@ function c101102087.ctval(e,re,rp)
return rp==1-e:GetHandlerPlayer() and (re:GetActiveType() & TYPE_MONSTER)>0
end
function c101102087.negcon(e,tp,eg,ep,ev,re,r,rp)
return not e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED) and re:GetHandler()~=e:GetHandler()
return not e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED) and ep==1-tp
and re:IsActiveType(TYPE_SPELL) and Duel.IsChainNegatable(ev)
end
function c101102087.negcost(e,tp,eg,ep,ev,re,r,rp,chk)
......@@ -75,7 +75,7 @@ function c101102087.thcon(e,tp,eg,ep,ev,re,r,rp)
return rp==1-tp and c:GetPreviousControler()==tp
end
function c101102087.thtgfilter(c)
return c:IsSetCard(0x258) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand()
return c:IsSetCard(0x258) and c:IsType(TYPE_TRAP) and c:IsAbleToHand()
end
function c101102087.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_REMOVED) and chkc:IsControler(tp) and c101102087.thtgfilter(chkc) end
......
......@@ -48,7 +48,7 @@ function c101102088.ctval(e,re,rp)
return rp==1-e:GetHandlerPlayer() and (re:GetActiveType() & TYPE_SPELL)>0
end
function c101102088.drcon(e,tp,eg,ep,ev,re,r,rp)
return not e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED) and re:GetHandler()~=e:GetHandler()
return not e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED) and ep==1-tp
and re:IsActiveType(TYPE_TRAP) and Duel.IsChainNegatable(ev)
end
function c101102088.drcost(e,tp,eg,ep,ev,re,r,rp,chk)
......
......@@ -48,8 +48,8 @@ function c101102089.ctval(e,re,rp)
return rp==1-e:GetHandlerPlayer() and (re:GetActiveType() & TYPE_MONSTER)>0
end
function c101102089.rmcon(e,tp,eg,ep,ev,re,r,rp)
return not e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED) and re:GetHandler()~=e:GetHandler()
and re:IsActiveType(TYPE_TRAP) and Duel.IsChainNegatable(ev)
return not e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED) and ep==1-tp
and re:IsActiveType(TYPE_MONSTER) and Duel.IsChainNegatable(ev)
end
function c101102089.cfilter(c)
return not c:IsStatus(STATUS_BATTLE_DESTROYED)
......@@ -57,13 +57,13 @@ end
function c101102089.rmcostfilter2(c,e)
return c:IsAbleToRemove() and c:IsCanBeEffectTarget(e)
end
function c101102089.rmcostfilter(c,e)
return c:IsAbleToRemoveAsCost() and Duel.IsExistingMatchingCard(c101102089.rmcostfilter2,tp,LOCATION_MZONE,LOCATION_MZONE,1,c)
function c101102089.rmcostfilter(c,e,tp)
return c:IsAbleToRemoveAsCost() and Duel.IsExistingMatchingCard(c101102089.rmcostfilter2,tp,LOCATION_MZONE,LOCATION_MZONE,1,c,e)
end
function c101102089.rmcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c101102089.rmcostfilter,tp,LOCATION_HAND+LOCATION_ONFIELD,0,1,nil,e) end
if chk==0 then return Duel.IsExistingMatchingCard(c101102089.rmcostfilter,tp,LOCATION_HAND+LOCATION_ONFIELD,0,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,c101102089.rmcostfilter,tp,LOCATION_HAND+LOCATION_ONFIELD,0,1,1,nil,e)
local g=Duel.SelectMatchingCard(tp,c101102089.rmcostfilter,tp,LOCATION_HAND+LOCATION_ONFIELD,0,1,1,nil,e,tp)
Duel.Remove(g,POS_FACEUP,REASON_COST)
end
function c101102089.rmtg(e,tp,eg,ep,ev,re,r,rp,chk)
......
......@@ -55,7 +55,7 @@ end
function c101102090.desop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc and tc:IsRelateToEffect(e) then
Duel.Destroy(g,REASON_EFFECT)
Duel.Destroy(tc,REASON_EFFECT)
end
end
function c101102090.immcon(e,tp,eg,ep,ev,re,r,rp)
......
......@@ -41,7 +41,7 @@ function c101102091.negcon(e,tp,eg,ep,ev,re,r,rp)
end
function c101102091.cfilter(c,re)
return not c:IsStatus(STATUS_BATTLE_DESTROYED) and c:IsAbleToRemoveAsCost()
and c:IsType(re:GetActiveType())
and c:IsType(re:GetActiveType()) and c:IsSetCard(0x258)
end
function c101102091.negcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c101102091.cfilter,tp,LOCATION_GRAVE+LOCATION_HAND+LOCATION_ONFIELD,0,1,nil,re) end
......
......@@ -15,17 +15,17 @@ function c101102092.initial_effect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_UPDATE_ATTACK)
e2:SetRange(LOCATION_FZONE)
e2:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE)
e2:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,0x19))
e2:SetTargetRange(LOCATION_MZONE,0)
e2:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,0x258))
e2:SetValue(c101102092.atkval)
c:RegisterEffect(e2)
--draw
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(101102092,0))
e3:SetDescription(aux.Stringid(101102092,1))
e3:SetCategory(CATEGORY_DRAW+CATEGORY_TODECK)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e3:SetRange(LOCATION_MZONE)
e3:SetRange(LOCATION_FZONE)
e3:SetCountLimit(1)
e3:SetTarget(c101102092.drtg)
e3:SetOperation(c101102092.drop)
......@@ -38,13 +38,13 @@ function c101102092.atkval(e,c)
local tp=e:GetHandler():GetControler()
return Duel.GetMatchingGroupCount(c101102092.atkvalfilter,tp,LOCATION_REMOVED,0,nil)*100
end
function c101102092.thfilter(c,e,tp)
return c:IsCanBeSpecialSummoned(e,0,tp,false,false) and c:IsLevelBelow(4)
function c101102092.spfilter(c,e,tp)
return c:IsSetCard(0x258) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and c:IsLevelBelow(4)
end
function c101102092.activate(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) then return end
if Duel.GetMZoneCount(tp)<=0 then return end
local g=Duel.SelectMatchingCard(tp,c101102092.thfilter,tp,LOCATION_HAND+LOCATION_REMOVED,0,1,1,nil,e,tp)
local g=Duel.SelectMatchingCard(tp,c101102092.spfilter,tp,LOCATION_HAND+LOCATION_REMOVED,0,1,1,nil,e,tp)
if #g>0 and Duel.SelectYesNo(tp,aux.Stringid(101102092,0)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg=g:Select(tp,1,1,nil)
......
......@@ -11,15 +11,10 @@ function c101102093.initial_effect(c)
e1:SetTarget(c101102093.target)
e1:SetOperation(c101102093.activate)
c:RegisterEffect(e1)
--damage
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_CHAINING)
e2:SetRange(LOCATION_MZONE)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e2:SetOperation(c101102093.regop)
e2:SetLabelObject(e1)
c:RegisterEffect(e2)
Duel.AddCustomActivityCounter(101102093,ACTIVITY_CHAIN,c101102093.chainfilter)
end
function c101102093.chainfilter(re,tp,cid)
return false
end
function c101102093.filter0(c)
return c:IsType(TYPE_MONSTER) and c:IsCanBeFusionMaterial() and c:IsAbleToRemove()
......@@ -31,11 +26,9 @@ function c101102093.filter2(c,e,tp,m,f,chkf)
return c:IsType(TYPE_FUSION) and c:IsSetCard(0x258) and (not f or f(c))
and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_FUSION,tp,false,false) and c:CheckFusionMaterial(m,nil,chkf)
end
function c101102093.cfilter(c)
return c:GetSummonLocation()==LOCATION_EXTRA
end
function c101102093.fcheck(tp,sg,fc)
return (sg:FilterCount(Card.IsLocation,nil,LOCATION_DECK)<=1 and fc:IsLocation(LOCATION_DECK)) and (sg:FilterCount(Card.IsLocation,nil,LOCATION_GRAVE)<=1 and fc:IsLocation(LOCATION_GRAVE))
return sg:FilterCount(Card.IsLocation,nil,LOCATION_DECK)<=1 and sg:FilterCount(Card.IsLocation,nil,LOCATION_GRAVE)<=1
end
function c101102093.gcheck(sg)
return sg:FilterCount(Card.IsLocation,nil,LOCATION_DECK)<=1 and sg:FilterCount(Card.IsLocation,nil,LOCATION_GRAVE)<=1
......@@ -44,12 +37,12 @@ function c101102093.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
local chkf=tp
local mg1=Duel.GetFusionMaterial(tp)
if e:GetLabel()==Duel.GetTurnCount() then
if Duel.GetCustomActivityCount(101102093,1-tp,ACTIVITY_CHAIN)~=0 then
local mg2=Duel.GetMatchingGroup(c101102093.filter0,tp,LOCATION_DECK+LOCATION_GRAVE,0,nil)
if mg2:GetCount()>0 then
mg1:Merge(mg2)
Auxiliary.FCheckAdditional=c87931906.fcheck
Auxiliary.GCheckAdditional=c87931906.gcheck
Auxiliary.FCheckAdditional=c101102093.fcheck
Auxiliary.GCheckAdditional=c101102093.gcheck
end
end
local res=Duel.IsExistingMatchingCard(c101102093.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg1,nil,chkf)
......@@ -72,7 +65,7 @@ function c101102093.activate(e,tp,eg,ep,ev,re,r,rp)
local chkf=tp
local mg1=Duel.GetFusionMaterial(tp):Filter(c101102093.filter1,nil,e)
local exmat=false
if Duel.IsExistingMatchingCard(c101102093.cfilter,tp,0,LOCATION_MZONE,1,nil) then
if Duel.GetCustomActivityCount(101102093,1-tp,ACTIVITY_CHAIN)~=0 then
local mg2=Duel.GetMatchingGroup(c101102093.filter0,tp,LOCATION_DECK+LOCATION_GRAVE,0,nil)
if mg2:GetCount()>0 then
mg1:Merge(mg2)
......@@ -122,7 +115,3 @@ function c101102093.activate(e,tp,eg,ep,ev,re,r,rp)
tc:CompleteProcedure()
end
end
function c101102093.regop(e,tp,eg,ep,ev,re,r,rp)
if rp==tp then return end
e:GetLabelObject():SetLabel(Duel.GetTurnCount())
end
\ No newline at end of file
......@@ -63,11 +63,13 @@ function c101102094.operation(e,tp,eg,ep,ev,re,r,rp)
end
function c101102094.rmcon(e,tp,eg,ep,ev,re,r,rp)
local ec=e:GetHandler():GetEquipTarget()
if not ec then return false end
local tc=ec:GetBattleTarget()
return ec and tc and Duel.GetAttacker()==ec and tc:IsSummonType(SUMMON_TYPE_SPECIAL)
return tc and Duel.GetAttacker()==ec and tc:IsSummonType(SUMMON_TYPE_SPECIAL)
and tc:IsControler(1-tp)
end
function c101102094.rmtg(e,tp,eg,ep,ev,re,r,rp,chk)
local ec=e:GetHandler():GetEquipTarget()
local tc=ec:GetBattleTarget()
if chk==0 then return tc and tc:IsAbleToRemove() end
Duel.SetOperationInfo(0,CATEGORY_REMOVE,tc,1,0,0)
......@@ -98,7 +100,7 @@ function c101102094.spop(e,tp,eg,ep,ev,re,r,rp)
if not tc:IsRelateToEffect(e) then return end
if Duel.SendtoGrave(tc,REASON_EFFECT)>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c101102094.spopfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,1,nil,e,tp,tc:GetOriginalAttribute())
local g=Duel.SelectMatchingCard(tp,c101102094.sptgfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,1,nil,e,tp,tc:GetOriginalAttribute())
if #g>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
......
......@@ -27,17 +27,20 @@ function c101103001.regop(e,tp,eg,ep,ev,re,r,rp)
e1:SetValue(59464593)
e1:SetLabel(1)
e1:SetCondition(c101103001.condition)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
c:RegisterEffect(e1)
--control
local e2=e1:Clone()
e2:SetCode(EFFECT_CANNOT_CHANGE_CONTROL)
e2:SetLabel(10)
e2:SetReset(RESET_EVENT+RESETS_STANDARD)
c:RegisterEffect(e2)
--battle indes
local e3=e1:Clone()
e3:SetCode(EFFECT_INDESTRUCTABLE_BATTLE)
e3:SetValue(1)
e3:SetLabel(100)
e3:SetReset(RESET_EVENT+RESETS_STANDARD)
c:RegisterEffect(e3)
--destroy
local e4=Effect.CreateEffect(c)
......@@ -54,6 +57,7 @@ function c101103001.regop(e,tp,eg,ep,ev,re,r,rp)
e4:SetCost(c101103001.descost)
e4:SetTarget(c101103001.destg)
e4:SetOperation(c101103001.desop)
e4:SetReset(RESET_EVENT+RESETS_STANDARD)
c:RegisterEffect(e4)
--destroy2
local e5=Effect.CreateEffect(c)
......@@ -66,6 +70,7 @@ function c101103001.regop(e,tp,eg,ep,ev,re,r,rp)
e5:SetCondition(c101103001.condition)
e5:SetTarget(c101103001.destg2)
e5:SetOperation(c101103001.desop2)
e5:SetReset(RESET_EVENT+RESETS_STANDARD)
c:RegisterEffect(e5)
end
function c101103001.condition(e,tp,eg,ep,ev,re,r,rp)
......
......@@ -42,7 +42,7 @@ function c101103039.initial_effect(c)
end
function c101103039.filter(c,tp)
return c:IsReason(REASON_EFFECT) and c:IsPreviousSetCard(0xe1)
and c:IsPreviousControler(tp) and c:IsPreviousLocation(LOCATION_ONFIELD) and c:IsPreviousPosition(POS_FACEUP)
and c:GetPreviousControler()==tp and c:IsPreviousLocation(LOCATION_ONFIELD) and c:IsPreviousPosition(POS_FACEUP)
end
function c101103039.despcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c101103039.filter,1,nil,tp)
......
......@@ -20,6 +20,7 @@ function c101103041.initial_effect(c)
e2:SetCategory(CATEGORY_TOHAND)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetCountLimit(1)
e2:SetRange(LOCATION_MZONE)
e2:SetTarget(c101103041.thtg)
e2:SetOperation(c101103041.thop)
c:RegisterEffect(e2)
......@@ -40,7 +41,7 @@ function c101103041.indtg(e,c)
return c:IsFaceup() and c:IsType(0x14f) and c:IsType(TYPE_FUSION)
end
function c101103041.indct(e,re,r,rp)
if bit.band(r,REASON_EFFECT)~=0 then
if bit.band(r,REASON_BATTLE)~=0 then
return 1
else return 0 end
end
......
......@@ -9,7 +9,7 @@ function c101103049.initial_effect(c)
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(101103049,0))
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_DESTROYED)
e1:SetCode(EVENT_TO_GRAVE)
e1:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET)
e1:SetCountLimit(1,101103049)
e1:SetCondition(c101103049.condition)
......@@ -22,7 +22,7 @@ function c101103049.initial_effect(c)
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET)
e2:SetCode(EVENT_DESTROYED)
e2:SetCode(EVENT_TO_GRAVE)
e2:SetCountLimit(1,101103049)
e2:SetCondition(c101103049.condition)
e2:SetTarget(c101103049.sptg)
......
......@@ -7,6 +7,7 @@ function c101103069.initial_effect(c)
e1:SetCategory(CATEGORY_DISABLE)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_MAIN_END)
e1:SetCountLimit(1,101103069+EFFECT_COUNT_CODE_OATH)
e1:SetCondition(c101103069.condition)
e1:SetTarget(c101103069.target)
......@@ -38,27 +39,30 @@ function c101103069.target(e,tp,eg,ep,ev,re,r,rp,chk)
if ct>0 and Duel.GetLocationCount(1-tp,LOCATION_MZONE,PLAYER_NONE,0)>0 then
if #g>0 and Duel.SelectYesNo(tp,aux.Stringid(101103069,0)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DISABLEZONE)
dis=Duel.SelectDisableField(tp,1,0,LOCATION_MZONE,0xe000e0)|dis
dis=Duel.SelectDisableField(tp,1,0,LOCATION_MZONE,0)|dis
elseif #g==0 then
if ct==2 and Duel.GetLocationCount(1-tp,LOCATION_MZONE,PLAYER_NONE,0)>1 and Duel.SelectYesNo(tp,aux.Stringid(101103069,1)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DISABLEZONE)
dis=Duel.SelectDisableField(tp,2,0,LOCATION_MZONE,0xe000e0)|dis
dis=Duel.SelectDisableField(tp,2,0,LOCATION_MZONE,0)|dis
else
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DISABLEZONE)
dis=Duel.SelectDisableField(tp,1,0,LOCATION_MZONE,0xe000e0)|dis
dis=Duel.SelectDisableField(tp,1,0,LOCATION_MZONE,0)|dis
end
end
end
local tc=g:GetFirst()
while tc do
dis=(2^tc:GetSequence())|dis
dis=(2^tc:GetSequence())*0x10000|dis
tc=g:GetNext()
end
e:SetLabel(dis)
Duel.Hint(HINT_ZONE,tp,dis)
end
function c101103069.disfilter2(c,dis)
return c:IsFaceup() and (2^c:GetSequence())&dis~=0
return c:IsFaceup() and (2^c:GetSequence())*0x10000&dis~=0
end
function c101103069.disfilter3(c,dis)
return c:IsFacedown() and (2^c:GetSequence())*0x10000&dis~=0
end
function c101103069.activate(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
......@@ -85,13 +89,18 @@ function c101103069.activate(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)
dis=dis-(2^tc:GetSequence())
dis=dis-(2^tc:GetSequence())*0x10000
tc=g:GetNext()
end
local sg=Duel.GetMatchingGroup(c101103069.disfilter3,tp,0,LOCATION_MZONE,nil,dis)
local sc=sg:GetFirst()
while sc do
dis=dis-(2^sc:GetSequence())*0x10000
sc=sg:GetNext()
end
if dis~=0 then
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD)
e3:SetRange(LOCATION_MZONE)
e3:SetCode(EFFECT_DISABLE_FIELD)
e3:SetOperation(c101103069.disop)
e3:SetReset(RESET_PHASE+PHASE_END)
......
......@@ -64,7 +64,7 @@ function c101103074.tkop(e,tp,eg,ep,ev,re,r,rp)
end
end
function c101103074.repfilter(c,tp)
return c:IsFaceup() and c:IsLocation(LOCATION_MZONE)
return c:IsFaceup() and c:IsLocation(LOCATION_MZONE) and c:IsReason(REASON_BATTLE)
and c:IsSetCard(0x137) and not c:IsReason(REASON_REPLACE)
end
function c101103074.reptg(e,tp,eg,ep,ev,re,r,rp,chk)
......
......@@ -37,7 +37,7 @@ function c101103080.activate(e,tp,eg,ep,ev,re,r,rp)
local fnum=Duel.GetFieldGroupCount(tp,0,LOCATION_ONFIELD)
local gnum=Duel.GetFieldGroupCount(tp,LOCATION_GRAVE,0)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
local dg=Duel.Duel.SelectMatchingCard(tp,c101103080.filter,tp,0,LOCATION_MZONE,1,1,nil)
local dg=Duel.SelectMatchingCard(tp,c101103080.filter,tp,0,LOCATION_MZONE,1,1,nil)
local mon=dg:GetFirst()
local lnum=mon:GetLevel()
--The equation
......
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