Commit 4b9f67cb authored by VanillaSalt's avatar VanillaSalt

fix

parent 42909847
......@@ -22,12 +22,12 @@ function c10860121.condition(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c10860121.cfilter,1,nil,tp)
end
function c10860121.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetFlagEffect(tp,10860121)==0 and e:GetHandler():IsDiscardable() end
Duel.SendtoGrave(e:GetHandler(),REASON_COST+REASON_DISCARD)
if chk==0 then return Duel.GetFlagEffect(tp,10860121)==0 and e:GetHandler():IsAbleToGraveAsCost() end
Duel.SendtoGrave(e:GetHandler(),REASON_COST)
Duel.RegisterFlagEffect(tp,10860121,RESET_PHASE+PHASE_END,0,1)
end
function c10860121.filter(c,e,tp)
return c:IsSetCard(0x88) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP)
return c:IsSetCard(0x88) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c10860121.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
......@@ -41,4 +41,4 @@ function c10860121.operation(e,tp,eg,ep,ev,re,r,rp)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
end
\ No newline at end of file
end
......@@ -19,30 +19,12 @@ function c11682713.initial_effect(c)
e2:SetTarget(c11682713.tdtg)
e2:SetOperation(c11682713.tdop)
c:RegisterEffect(e2)
if not c11682713.global_check then
c11682713.global_check=true
c11682713[0]=Group.CreateGroup()
c11682713[0]:KeepAlive()
c11682713[1]=0
local ge1=Effect.CreateEffect(c)
ge1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
ge1:SetCode(EVENT_CONFIRM_DECKTOP)
ge1:SetOperation(c11682713.checkop)
Duel.RegisterEffect(ge1,0)
end
end
function c11682713.checkop(e,tp,eg,ep,ev,re,r,rp)
c11682713[0]:Clear()
c11682713[0]:Merge(eg)
c11682713[1]=re
end
function c11682713.condition(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local a=Duel.GetAttacker()
local d=Duel.GetAttackTarget()
if a~=c then d=a end
local bc=c:GetBattleTarget()
return c:IsRelateToBattle() and c:IsFaceup()
and d and d:GetLocation()==LOCATION_GRAVE and d:IsType(TYPE_MONSTER)
and bc:IsLocation(LOCATION_GRAVE) and bc:IsType(TYPE_MONSTER) and bc:IsReason(REASON_BATTLE)
end
function c11682713.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)>0 end
......@@ -54,14 +36,15 @@ function c11682713.operation(e,tp,eg,ep,ev,re,r,rp)
local tc=g:GetFirst()
if tc:IsRace(RACE_PLANT) then
Duel.DisableShuffleCheck()
Duel.SendtoGrave(g,REASON_EFFECT)
Duel.SendtoGrave(g,REASON_EFFECT+REASON_REVEAL)
else
Duel.MoveSequence(tc,1)
end
end
function c11682713.tdcon(e,tp,eg,ep,ev,re,r,rp)
return re and e:GetHandler():IsPreviousLocation(LOCATION_DECK)
and c11682713[0]:IsContains(e:GetHandler()) and c11682713[1]==re
local c=e:GetHandler()
return c:IsPreviousLocation(LOCATION_DECK) and
(c:IsReason(REASON_REVEAL) or c:IsPreviousPosition(POS_FACEUP) or Duel.IsPlayerAffectedByEffect(tp,EFFECT_REVERSE_DECK))
end
function c11682713.tdtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToHand() end
......@@ -72,4 +55,4 @@ function c11682713.tdop(e,tp,eg,ep,ev,re,r,rp)
Duel.SendtoHand(e:GetHandler(),nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,e:GetHandler())
end
end
\ No newline at end of file
end
......@@ -29,7 +29,6 @@ function c19748583.initial_effect(c)
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e4:SetCategory(CATEGORY_DESTROY)
e4:SetProperty(EFFECT_FLAG_DAMAGE_STEP)
e4:SetCode(EVENT_BATTLE_START)
e4:SetRange(LOCATION_SZONE)
e4:SetCondition(c19748583.descon)
......@@ -55,7 +54,7 @@ function c19748583.eqop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
local tc=Duel.GetFirstTarget()
if Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 or tc:GetControler()~=tp or tc:IsFacedown() or not tc:IsRelateToEffect(e) or not c:CheckUniqueOnField(tp) then
if Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 or tc:GetControler()~=tp or tc:IsFacedown() or not tc:IsRelateToEffect(e) then
Duel.SendtoGrave(c,REASON_EFFECT)
return
end
......@@ -73,29 +72,27 @@ end
function c19748583.reptg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return bit.band(r,REASON_EFFECT)~=0 and c:GetEquipTarget():IsAttribute(ATTRIBUTE_LIGHT) end
return Duel.SelectYesNo(e:GetOwnerPlayer(),aux.Stringid(19748583,0))
return Duel.SelectYesNo(e:GetOwnerPlayer(),aux.Stringid(19748583,1))
end
function c19748583.repop(e,tp,eg,ep,ev,re,r,rp)
Duel.Destroy(e:GetHandler(),REASON_EFFECT+REASON_REPLACE)
end
function c19748583.descon(e,re,r,rp)
function c19748583.descon(e,tp,eg,ep,ev,re,r,rp)
local tg=e:GetHandler():GetEquipTarget()
return tg:IsAttribute(ATTRIBUTE_DARK) and (Duel.GetAttacker()==tg or Duel.GetAttackTarget()==tg)
return tg and tg:IsAttribute(ATTRIBUTE_DARK) and (Duel.GetAttacker()==tg or Duel.GetAttackTarget()==tg)
end
function c19748583.destg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
local tc=Duel.GetAttacker()
if tc==c:GetEquipTarget() then tc=Duel.GetAttackTarget() end
local tc=c:GetEquipTarget():GetBattleTarget()
if chk==0 then return tc and tc:IsControler(1-tp) end
local g=Group.FromCards(tc,c:GetEquipTarget())
local g=Group.FromCards(tc,c)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0)
end
function c19748583.desop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetAttacker()
if tc==c:GetEquipTarget() then tc=Duel.GetAttackTarget() end
if tc:IsRelateToBattle() and Duel.Destroy(tc,REASON_EFFECT) then
local tc=c:GetEquipTarget():GetBattleTarget()
if tc:IsRelateToBattle() and Duel.Destroy(tc,REASON_EFFECT)~=0 then
Duel.BreakEffect()
Duel.Destroy(c,REASON_EFFECT)
end
end
\ No newline at end of file
end
--Powered Insektron
--Powered Inzektron
function c46132282.initial_effect(c)
--synchro summon
aux.AddSynchroProcedure(c,nil,aux.NonTuner(nil),1)
......@@ -8,11 +8,11 @@ function c46132282.initial_effect(c)
e1:SetDescription(aux.Stringid(46132282,0))
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetCondition(c46132282.descon)
e1:SetCondition(c46132282.effcon)
e1:SetOperation(c46132282.effop)
c:RegisterEffect(e1)
end
function c46132282.descon(e,tp,eg,ep,ev,re,r,rp)
function c46132282.effcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetSummonType()==SUMMON_TYPE_SYNCHRO
end
function c46132282.effop(e,tp,eg,ep,ev,re,r,rp)
......@@ -29,12 +29,12 @@ function c46132282.effop(e,tp,eg,ep,ev,re,r,rp)
e2:SetCode(EFFECT_INDESTRUCTABLE_BATTLE)
c:RegisterEffect(e2)
end
local e3=Effect.CreateEffect(e:GetHandler())
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD)
e3:SetCode(EFFECT_CHANGE_DAMAGE)
e3:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e3:SetTargetRange(1,0)
e3:SetValue(1)
e3:SetValue(0)
e3:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e3,tp)
end
\ No newline at end of file
end
......@@ -12,7 +12,7 @@ end
function c46955770.filter(c)
return c:IsFaceup() and c:IsCode(47355498)
end
function c46955770.con(e,tp,eg,ep,ev,re,r,rp)
function c46955770.con(e)
return Duel.IsExistingMatchingCard(c46955770.filter,0,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil)
or Duel.GetEnvironment()==47355498
end
\ No newline at end of file
end
......@@ -20,27 +20,11 @@ function c47077318.initial_effect(c)
e2:SetCondition(c47077318.tdcon)
e2:SetOperation(c47077318.tdop)
c:RegisterEffect(e2)
if not c47077318.global_check then
c47077318.global_check=true
c47077318[0]=Group.CreateGroup()
c47077318[0]:KeepAlive()
c47077318[1]=0
local ge1=Effect.CreateEffect(c)
ge1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
ge1:SetCode(EVENT_CONFIRM_DECKTOP)
ge1:SetOperation(c47077318.checkop)
Duel.RegisterEffect(ge1,0)
end
end
function c47077318.checkop(e,tp,eg,ep,ev,re,r,rp)
c47077318[0]:Clear()
c47077318[0]:Merge(eg)
c47077318[1]=re
end
function c47077318.condition(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsReason(REASON_DESTROY) and c:GetReasonPlayer()~=tp
and c:GetPreviousControler()==tp and c:IsPreviousLocation(LOCATION_ONFIELD)
and c:GetPreviousControler()==tp
end
function c47077318.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)>0 end
......@@ -52,22 +36,22 @@ function c47077318.operation(e,tp,eg,ep,ev,re,r,rp)
local tc=g:GetFirst()
if tc:IsRace(RACE_PLANT) then
Duel.DisableShuffleCheck()
Duel.SendtoGrave(g,REASON_EFFECT)
Duel.SendtoGrave(g,REASON_EFFECT+REASON_REVEAL)
else
Duel.MoveSequence(tc,1)
end
end
function c47077318.tdcon(e,tp,eg,ep,ev,re,r,rp)
return re and e:GetHandler():IsPreviousLocation(LOCATION_DECK)
and c47077318[0]:IsContains(e:GetHandler()) and c47077318[1]==re
local c=e:GetHandler()
return c:IsPreviousLocation(LOCATION_DECK) and
(c:IsReason(REASON_REVEAL) or c:IsPreviousPosition(POS_FACEUP) or Duel.IsPlayerAffectedByEffect(tp,EFFECT_REVERSE_DECK))
end
function c47077318.filter(c)
return c:IsFaceup() and c:IsRace(RACE_PLANT)
end
function c47077318.tdop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(c47077318.filter,tp,LOCATION_MZONE,0,nil)
tc=g:GetFirst()
if not tc then return end
local tc=g:GetFirst()
while tc do
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
......@@ -80,4 +64,4 @@ function c47077318.tdop(e,tp,eg,ep,ev,re,r,rp)
tc:RegisterEffect(e2)
tc=g:GetNext()
end
end
\ No newline at end of file
end
......@@ -34,9 +34,7 @@ end
function c72537897.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
local g=Duel.GetMatchingGroup(c72537897.spfilter,tp,LOCATION_DECK,0,nil,e,tp)
return Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0,nil)==0 and
Duel.GetLocationCount(tp,LOCATION_MZONE)>2 and
g:GetClassCount(Card.GetCode)>=3 end
return Duel.GetLocationCount(tp,LOCATION_MZONE)>2 and g:GetClassCount(Card.GetCode)>=3 end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,3,tp,LOCATION_DECK)
end
function c72537897.activate(e,tp,eg,ep,ev,re,r,rp)
......@@ -71,7 +69,7 @@ function c72537897.activate(e,tp,eg,ep,ev,re,r,rp)
tc=sg1:GetNext()
end
sg1:KeepAlive()
local e3=Effect.CreateEffect(e:GetHandler())
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e3:SetCode(EVENT_PHASE+PHASE_END)
e3:SetReset(RESET_PHASE+PHASE_END)
......@@ -90,4 +88,4 @@ function c72537897.desop(e,tp,eg,ep,ev,re,r,rp)
local tg=g:Filter(c72537897.desfilter,nil)
g:DeleteGroup()
Duel.Destroy(tg,REASON_EFFECT)
end
\ No newline at end of file
end
--Noble Knight Peredur
function c73359475.initial_effect(c)
--Normal monster
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetCode(EFFECT_CHANGE_TYPE)
e1:SetRange(LOCATION_MZONE)
e1:SetCondition(c73359475.eqcon1)
e1:SetValue(TYPE_NORMAL+TYPE_MONSTER)
c:RegisterEffect(e1)
--Attribute Dark
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
......@@ -34,15 +25,9 @@ function c73359475.initial_effect(c)
e4:SetOperation(c73359475.thop)
c:RegisterEffect(e4)
end
function c73359475.eqcon1(e)
return not e:GetHandler():GetEquipGroup():IsExists(Card.IsSetCard,1,nil,0x207a)
end
function c73359475.eqcon2(e)
return e:GetHandler():GetEquipGroup():IsExists(Card.IsSetCard,1,nil,0x207a)
end
function c73359475.cfilter(c,tc)
return c:IsSetCard(0x207a) and c:GetPreviousEquipTarget()==tc and c:IsReason(REASON_LOST_TARGET)
end
function c73359475.thcon(e,tp,eg,ep,ev,re,r,rp)
return c73359475.eqcon2(e) and e:GetHandler():IsLocation(LOCATION_GRAVE)
end
......@@ -60,5 +45,6 @@ function c73359475.thop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.SendtoHand(tc,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,tc)
end
end
\ No newline at end of file
end
......@@ -63,4 +63,4 @@ function c84472026.indesop(e,tp,eg,ep,ev,re,r,rp)
e2:SetCode(EFFECT_INDESTRUCTABLE_EFFECT)
tc:RegisterEffect(e2)
end
end
\ No newline at end of file
end
......@@ -11,11 +11,10 @@ function c8522996.initial_effect(c)
--change attribute
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(8522996,1))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
e2:SetCost(c8522996.cost)
e2:SetCondition(c8522996.con)
e2:SetCost(c8522996.cost)
e2:SetTarget(c8522996.tg)
e2:SetOperation(c8522996.op)
c:RegisterEffect(e2)
......@@ -30,16 +29,16 @@ function c8522996.initial_effect(c)
c:RegisterEffect(e3)
end
function c8522996.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and
Duel.IsPlayerCanSpecialSummonMonster(tp,8522996,0,0x11,0,0,2,1000,2400,6,RACE_FIEND,ATTRIBUTE_DARKNESS) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsPlayerCanSpecialSummonMonster(tp,8522996,0,0x21,1000,2400,6,RACE_FIEND,ATTRIBUTE_DARK) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function c8522996.activate(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0
or not Duel.IsPlayerCanSpecialSummonMonster(tp,8522996,0,0x11,1000,2400,6,RACE_FIEND,ATTRIBUTE_DARKNESS) then return end
c:AddTrapMonsterAttribute(TYPE_EFFECT,ATTRIBUTE_DARKNESS,RACE_FIEND,6,1000,2400)
or not Duel.IsPlayerCanSpecialSummonMonster(tp,8522996,0,0x21,1000,2400,6,RACE_FIEND,ATTRIBUTE_DARK) then return end
c:AddTrapMonsterAttribute(TYPE_EFFECT,ATTRIBUTE_DARK,RACE_FIEND,6,1000,2400)
Duel.SpecialSummon(c,1,tp,tp,true,false,POS_FACEUP)
c:TrapMonsterBlock()
end
......@@ -71,6 +70,7 @@ function c8522996.op(e,tp,eg,ep,ev,re,r,rp)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_DOUBLE_TRIBUTE)
e2:SetValue(c8522996.condition)
e2:SetReset(RESET_EVENT+0x1fe0000)
c:RegisterEffect(e2)
end
function c8522996.condition(e,c)
......@@ -78,4 +78,4 @@ function c8522996.condition(e,c)
end
function c8522996.splimit(e,c,tp,sumtp,sumpos)
return not c8522996.condition(e,c)
end
\ No newline at end of file
end
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