Commit ac779bf0 authored by VanillaSalt's avatar VanillaSalt

fix

parent 28a3488f
...@@ -7,10 +7,14 @@ function c11228035.initial_effect(c) ...@@ -7,10 +7,14 @@ function c11228035.initial_effect(c)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP) e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP)
e1:SetCode(EVENT_FREE_CHAIN) e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(TIMING_DAMAGE_STEP) e1:SetHintTiming(TIMING_DAMAGE_STEP)
e1:SetCondition(c11228035.condition)
e1:SetTarget(c11228035.target) e1:SetTarget(c11228035.target)
e1:SetOperation(c11228035.activate) e1:SetOperation(c11228035.activate)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
function c11228035.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated()
end
function c11228035.filter(c) function c11228035.filter(c)
return c:IsType(TYPE_XYZ) return c:IsType(TYPE_XYZ)
end end
......
...@@ -12,14 +12,14 @@ function c1834107.initial_effect(c) ...@@ -12,14 +12,14 @@ function c1834107.initial_effect(c)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e2:SetRange(LOCATION_SZONE) e2:SetRange(LOCATION_SZONE)
e2:SetCode(EVENT_DAMAGE) e2:SetCode(EVENT_BATTLE_DAMAGE)
e2:SetCondition(c1834107.reccon) e2:SetCondition(c1834107.reccon)
e2:SetTarget(c1834107.rectg) e2:SetTarget(c1834107.rectg)
e2:SetOperation(c1834107.recop) e2:SetOperation(c1834107.recop)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
function c1834107.reccon(e,tp,eg,ep,ev,re,r,rp) function c1834107.reccon(e,tp,eg,ep,ev,re,r,rp)
if ep==tp or r~=REASON_BATTLE then return false end if ep==tp then return false end
local rc=eg:GetFirst() local rc=eg:GetFirst()
return rc:IsControler(tp) and rc:IsRace(RACE_THUNDER) return rc:IsControler(tp) and rc:IsRace(RACE_THUNDER)
end end
......
...@@ -2,6 +2,7 @@ ...@@ -2,6 +2,7 @@
function c22900598.initial_effect(c) function c22900598.initial_effect(c)
--Activate --Activate
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN) e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCondition(c22900598.condition) e1:SetCondition(c22900598.condition)
...@@ -32,7 +33,7 @@ function c22900598.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -32,7 +33,7 @@ function c22900598.activate(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstMatchingCard(c22900598.filter,tp,LOCATION_DECK,0,nil,tp) local tc=Duel.GetFirstMatchingCard(c22900598.filter,tp,LOCATION_DECK,0,nil,tp)
if tc then if tc then
local fc=Duel.GetFieldCard(1-tp,LOCATION_SZONE,5) local fc=Duel.GetFieldCard(1-tp,LOCATION_SZONE,5)
if fc and fc:IsStatus(STATUS_ACTIVATED) then if fc and fc:IsFaceup() then
Duel.MoveToField(tc,tp,tp,LOCATION_SZONE,POS_FACEUP,true) Duel.MoveToField(tc,tp,tp,LOCATION_SZONE,POS_FACEUP,true)
Duel.Destroy(fc,REASON_RULE) Duel.Destroy(fc,REASON_RULE)
else else
...@@ -42,7 +43,6 @@ function c22900598.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -42,7 +43,6 @@ function c22900598.activate(e,tp,eg,ep,ev,re,r,rp)
local tep=tc:GetControler() local tep=tc:GetControler()
local cost=te:GetCost() local cost=te:GetCost()
if cost then cost(te,tep,eg,ep,ev,re,r,rp,1) end if cost then cost(te,tep,eg,ep,ev,re,r,rp,1) end
tc:SetStatus(STATUS_ACTIVATED,true)
Duel.RaiseEvent(tc,EVENT_CHAIN_SOLVED,tc:GetActivateEffect(),0,tp,tp,Duel.GetCurrentChain()) Duel.RaiseEvent(tc,EVENT_CHAIN_SOLVED,tc:GetActivateEffect(),0,tp,tp,Duel.GetCurrentChain())
local sg=Duel.GetMatchingGroup(c22900598.spfilter,tp,LOCATION_GRAVE,0,nil,e,tp) local sg=Duel.GetMatchingGroup(c22900598.spfilter,tp,LOCATION_GRAVE,0,nil,e,tp)
if sg:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(22900598,0)) then if sg:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(22900598,0)) then
......
...@@ -13,14 +13,14 @@ function c23282832.initial_effect(c) ...@@ -13,14 +13,14 @@ function c23282832.initial_effect(c)
end end
function c23282832.filter(c,e,tp,tid) function c23282832.filter(c,e,tp,tid)
return c:GetTurnID()==tid and c:IsReason(REASON_BATTLE) and c:IsType(TYPE_NORMAL) return c:GetTurnID()==tid and c:IsReason(REASON_BATTLE) and c:IsType(TYPE_NORMAL)
and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and c:IsAttackBelow(1000) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end end
function c23282832.cost(e,tp,eg,ep,ev,re,r,rp,chk) function c23282832.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckLPCost(tp,500) end if chk==0 then return Duel.CheckLPCost(tp,500) end
Duel.PayLPCost(tp,500) Duel.PayLPCost(tp,500)
end end
function c23282832.tg(e,tp,eg,ep,ev,re,r,rp,chk) function c23282832.tg(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.IsExistingMatchingCard(c23282832.filter,tp,LOCATION_GRAVE,LOCATION_GRAVE,1,nil,e,tp,Duel.GetTurnCount()) end and Duel.IsExistingMatchingCard(c23282832.filter,tp,LOCATION_GRAVE,LOCATION_GRAVE,1,nil,e,tp,Duel.GetTurnCount()) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,PLAYER_ALL,LOCATION_GRAVE) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,PLAYER_ALL,LOCATION_GRAVE)
end end
......
...@@ -12,6 +12,7 @@ function c23289281.initial_effect(c) ...@@ -12,6 +12,7 @@ function c23289281.initial_effect(c)
end end
function c23289281.operaion(e,tp,eg,ep,ev,re,r,rp) function c23289281.operaion(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
if c:IsFacedown() or not c:IsRelateToEffect(e) 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_SET_ATTACK) e1:SetCode(EFFECT_SET_ATTACK)
...@@ -35,5 +36,7 @@ function c23289281.destg(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -35,5 +36,7 @@ function c23289281.destg(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,e:GetHandler(),1,0,0) Duel.SetOperationInfo(0,CATEGORY_DESTROY,e:GetHandler(),1,0,0)
end end
function c23289281.desop(e,tp,eg,ep,ev,re,r,rp) function c23289281.desop(e,tp,eg,ep,ev,re,r,rp)
Duel.Destroy(e:GetHandler(),REASON_EFFECT) if e:GetHandler():IsRelateToEffect(e) then
Duel.Destroy(e:GetHandler(),REASON_EFFECT)
end
end end
...@@ -16,7 +16,7 @@ function c24838456.condition(e,tp,eg,ep,ev,re,r,rp) ...@@ -16,7 +16,7 @@ function c24838456.condition(e,tp,eg,ep,ev,re,r,rp)
end end
function c24838456.cost(e,tp,eg,ep,ev,re,r,rp,chk) function c24838456.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end if chk==0 then return true end
Duel.PayLPCost(tp,Duel.GetLP(tp)/2) Duel.PayLPCost(tp,math.floor(Duel.GetLP(tp)/2))
end end
function c24838456.target(e,tp,eg,ep,ev,re,r,rp,chk) function c24838456.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end if chk==0 then return true end
......
...@@ -15,7 +15,7 @@ function c27174286.filter(c,e,tp) ...@@ -15,7 +15,7 @@ function c27174286.filter(c,e,tp)
end end
function c27174286.cost(e,tp,eg,ep,ev,re,r,rp,chk) function c27174286.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end if chk==0 then return true end
Duel.PayLPCost(tp,Duel.GetLP(tp)/2) Duel.PayLPCost(tp,math.floor(Duel.GetLP(tp)/2))
end end
function c27174286.tg(e,tp,eg,ep,ev,re,r,rp,chk) function c27174286.tg(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
...@@ -30,7 +30,7 @@ function c27174286.op(e,tp,eg,ep,ev,re,r,rp) ...@@ -30,7 +30,7 @@ function c27174286.op(e,tp,eg,ep,ev,re,r,rp)
if g:GetCount()>0 then if g:GetCount()>0 then
local tc=g:GetFirst() local tc=g:GetFirst()
while tc do while tc do
Duel.SpecialSummonStep(tc, 0, tp, tp, false, false, POS_FACEUP) Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP)
tc:RegisterFlagEffect(27174286,RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END,0,1) tc:RegisterFlagEffect(27174286,RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END,0,1)
tc=g:GetNext() tc=g:GetNext()
end end
......
...@@ -30,7 +30,7 @@ function c30126992.spcon(e,c) ...@@ -30,7 +30,7 @@ function c30126992.spcon(e,c)
return ct>4 return ct>4
end end
function c30126992.cfilter(c) function c30126992.cfilter(c)
return c:IsAttribute(ATTRIBUTE_LIGHT) and c:IsAbleToRemove() return c:IsAttribute(ATTRIBUTE_LIGHT) and c:IsAbleToRemoveAsCost()
end end
function c30126992.tdcost(e,tp,eg,ep,ev,re,r,rp,chk) function c30126992.tdcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c30126992.cfilter,tp,LOCATION_GRAVE,0,1,nil) end if chk==0 then return Duel.IsExistingMatchingCard(c30126992.cfilter,tp,LOCATION_GRAVE,0,1,nil) end
......
...@@ -18,38 +18,45 @@ function c34103656.initial_effect(c) ...@@ -18,38 +18,45 @@ function c34103656.initial_effect(c)
e3:SetCode(EFFECT_UPDATE_DEFENCE) e3:SetCode(EFFECT_UPDATE_DEFENCE)
c:RegisterEffect(e3) c:RegisterEffect(e3)
--lv --lv
local e3=Effect.CreateEffect(c) local e4=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(34103656,0)) e4:SetDescription(aux.Stringid(34103656,0))
e3:SetType(EFFECT_TYPE_IGNITION) e4:SetType(EFFECT_TYPE_IGNITION)
e3:SetRange(LOCATION_SZONE) e4:SetRange(LOCATION_SZONE)
e3:SetCountLimit(1) e4:SetCountLimit(1)
e3:SetOperation(c34103656.lvop) e4:SetTarget(c34103656.lvtg)
c:RegisterEffect(e3) e4:SetOperation(c34103656.lvop)
c:RegisterEffect(e4)
end end
function c34103656.adtg(e,c) function c34103656.adtg(e,c)
return c:IsAttribute(ATTRIBUTE_WATER) return c:IsAttribute(ATTRIBUTE_WATER)
end end
function c34103656.lvtg(e,c)
return c:GetFieldID()<=e:GetLabel() and c:IsAttribute(ATTRIBUTE_WATER)
end
function c34103656.cfilter(c) function c34103656.cfilter(c)
return c:IsFaceup() and c:IsAttribute(ATTRIBUTE_WATER) and c:GetLevel()>0
end
function c34103656.lvtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c34103656.cfilter,tp,LOCATION_MZONE,0,1,nil) end
end
function c34103656.lvfilter(c)
return c:IsFaceup() and c:IsAttribute(ATTRIBUTE_WATER) return c:IsFaceup() and c:IsAttribute(ATTRIBUTE_WATER)
end end
function c34103656.lvop(e,tp,eg,ep,ev,re,r,rp) function c34103656.lvop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
if c:IsRelateToEffect(e) then if c:IsRelateToEffect(e) then
local lv=Duel.GetMatchingGroupCount(c34103656.cfilter,e:GetHandlerPlayer(),LOCATION_MZONE,0,nil) local lv=Duel.GetMatchingGroupCount(c34103656.lvfilter,tp,LOCATION_MZONE,0,nil)
local g=Duel.GetFieldGroup(tp,LOCATION_MZONE,0) local g=Duel.GetFieldGroup(tp,LOCATION_MZONE,0)
local g,fid=g:GetMaxGroup(Card.GetFieldID) local mg,fid=g:GetMaxGroup(Card.GetFieldID)
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD) e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_UPDATE_LEVEL) e1:SetCode(EFFECT_UPDATE_LEVEL)
e1:SetRange(LOCATION_SZONE) e1:SetRange(LOCATION_SZONE)
e1:SetTargetRange(LOCATION_MZONE,0) e1:SetTargetRange(LOCATION_MZONE,0)
e1:SetTarget(c34103656.lvtg) e1:SetTarget(c34103656.efftg)
e1:SetValue(lv) e1:SetValue(lv)
e1:SetLabel(fid) e1:SetLabel(fid)
e1:SetReset(RESET_EVENT+0x1ff0000+RESET_PHASE+PHASE_END) e1:SetReset(RESET_EVENT+0x1ff0000+RESET_PHASE+PHASE_END)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
end end
function c34103656.efftg(e,c)
return c:GetFieldID()<=e:GetLabel() and c:IsAttribute(ATTRIBUTE_WATER) and c:GetLevel()>0
end
...@@ -17,7 +17,7 @@ function c36376145.condition(e,tp,eg,ep,ev,re,r,rp) ...@@ -17,7 +17,7 @@ function c36376145.condition(e,tp,eg,ep,ev,re,r,rp)
end end
function c36376145.cost(e,tp,eg,ep,ev,re,r,rp,chk) function c36376145.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetFlagEffect(tp,36376145)==0 end if chk==0 then return Duel.GetFlagEffect(tp,36376145)==0 end
Duel.PayLPCost(tp,Duel.GetLP(tp)/2) Duel.PayLPCost(tp,math.floor(Duel.GetLP(tp)/2))
Duel.RegisterFlagEffect(tp,36376145,RESET_PHASE+PHASE_END,0,1) Duel.RegisterFlagEffect(tp,36376145,RESET_PHASE+PHASE_END,0,1)
end end
function c36376145.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c36376145.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
......
...@@ -87,8 +87,7 @@ function c37115575.spcon(e,tp,eg,ep,ev,re,r,rp) ...@@ -87,8 +87,7 @@ function c37115575.spcon(e,tp,eg,ep,ev,re,r,rp)
end end
function c37115575.spcost(e,tp,eg,ep,ev,re,r,rp,chk) function c37115575.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end if chk==0 then return true end
local lp=Duel.GetLP(tp) Duel.PayLPCost(tp,math.floor(Duel.GetLP(tp)/2))
Duel.PayLPCost(tp,lp/2)
end end
function c37115575.sptg(e,tp,eg,ep,ev,re,r,rp,chk) function c37115575.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
......
...@@ -32,7 +32,7 @@ function c41420027.condition1(e,tp,eg,ep,ev,re,r,rp) ...@@ -32,7 +32,7 @@ function c41420027.condition1(e,tp,eg,ep,ev,re,r,rp)
end end
function c41420027.cost1(e,tp,eg,ep,ev,re,r,rp,chk) function c41420027.cost1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end if chk==0 then return true end
Duel.PayLPCost(tp,Duel.GetLP(tp)/2) Duel.PayLPCost(tp,math.floor(Duel.GetLP(tp)/2))
end end
function c41420027.target1(e,tp,eg,ep,ev,re,r,rp,chk) function c41420027.target1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end if chk==0 then return true end
...@@ -48,7 +48,7 @@ function c41420027.condition2(e,tp,eg,ep,ev,re,r,rp) ...@@ -48,7 +48,7 @@ function c41420027.condition2(e,tp,eg,ep,ev,re,r,rp)
end end
function c41420027.cost2(e,tp,eg,ep,ev,re,r,rp,chk) function c41420027.cost2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end if chk==0 then return true end
Duel.PayLPCost(tp,Duel.GetLP(tp)/2) Duel.PayLPCost(tp,math.floor(Duel.GetLP(tp)/2))
end end
function c41420027.target2(e,tp,eg,ep,ev,re,r,rp,chk) function c41420027.target2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end if chk==0 then return true end
......
...@@ -10,7 +10,8 @@ function c4896788.initial_effect(c) ...@@ -10,7 +10,8 @@ function c4896788.initial_effect(c)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
function c4896788.drcon(e,tp,eg,ep,ev,re,r,rp) function c4896788.drcon(e,tp,eg,ep,ev,re,r,rp)
return re:IsHasType(EFFECT_TYPE_ACTIVATE) and re:GetHandler():IsCode(55144522) return e:GetHandler():IsAttackPos()
and re:IsHasType(EFFECT_TYPE_ACTIVATE) and re:GetHandler():IsCode(55144522)
end end
function c4896788.drop(e,tp,eg,ep,ev,re,r,rp) function c4896788.drop(e,tp,eg,ep,ev,re,r,rp)
Duel.ChangeTargetParam(ev,3) Duel.ChangeTargetParam(ev,3)
......
...@@ -27,7 +27,7 @@ end ...@@ -27,7 +27,7 @@ end
function c55948544.cost(e,tp,eg,ep,ev,re,r,rp,chk) function c55948544.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end if chk==0 then return true end
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription()) Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
Duel.PayLPCost(tp,Duel.GetLP(tp)/2) Duel.PayLPCost(tp,math.floor(Duel.GetLP(tp)/2))
end end
function c55948544.operation1(e,tp,eg,ep,ev,re,r,rp) function c55948544.operation1(e,tp,eg,ep,ev,re,r,rp)
if not Duel.IsExistingMatchingCard(Card.IsCode,tp,LOCATION_GRAVE,0,1,nil,81332143) then return end if not Duel.IsExistingMatchingCard(Card.IsCode,tp,LOCATION_GRAVE,0,1,nil,81332143) then return end
......
...@@ -15,7 +15,7 @@ function c62121.operation(e,tp,eg,ep,ev,re,r,rp) ...@@ -15,7 +15,7 @@ function c62121.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
if c:IsRelateToEffect(e) and c:IsFaceup() then if c:IsRelateToEffect(e) and c:IsFaceup() then
local g=Duel.GetFieldGroup(tp,LOCATION_MZONE,LOCATION_MZONE) local g=Duel.GetFieldGroup(tp,LOCATION_MZONE,LOCATION_MZONE)
local g,fid=g:GetMaxGroup(Card.GetFieldID) local mg,fid=g:GetMaxGroup(Card.GetFieldID)
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD) e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetCode(EFFECT_UPDATE_ATTACK)
...@@ -26,19 +26,23 @@ function c62121.operation(e,tp,eg,ep,ev,re,r,rp) ...@@ -26,19 +26,23 @@ function c62121.operation(e,tp,eg,ep,ev,re,r,rp)
e1:SetLabel(fid) e1:SetLabel(fid)
e1:SetReset(RESET_EVENT+0x1ff0000) e1:SetReset(RESET_EVENT+0x1ff0000)
c:RegisterEffect(e1) c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c) local e2=e1:Clone()
e2:SetDescription(aux.Stringid(62121,1)) e2:SetCode(EFFECT_UPDATE_DEFENCE)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
e2:SetCode(EVENT_PHASE+PHASE_STANDBY)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1)
e2:SetProperty(EFFECT_FLAG_REPEAT)
e2:SetCondition(c62121.atkcon)
e2:SetOperation(c62121.atkop)
e2:SetLabelObject(e1) e2:SetLabelObject(e1)
e2:SetLabel(2)
e2:SetReset(RESET_EVENT+0x1ff0000+RESET_PHASE+PHASE_STANDBY+RESET_SELF_TURN,4)
c:RegisterEffect(e2) c:RegisterEffect(e2)
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(62121,1))
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
e3:SetCode(EVENT_PHASE+PHASE_STANDBY)
e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1)
e3:SetProperty(EFFECT_FLAG_REPEAT)
e3:SetCondition(c62121.atkcon)
e3:SetOperation(c62121.atkop)
e3:SetLabelObject(e2)
e3:SetLabel(2)
e3:SetReset(RESET_EVENT+0x1ff0000+RESET_PHASE+PHASE_STANDBY+RESET_SELF_TURN,4)
c:RegisterEffect(e3)
end end
end end
function c62121.atkcon(e,tp,eg,ep,ev,re,r,rp) function c62121.atkcon(e,tp,eg,ep,ev,re,r,rp)
...@@ -48,5 +52,6 @@ function c62121.atkop(e,tp,eg,ep,ev,re,r,rp) ...@@ -48,5 +52,6 @@ function c62121.atkop(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) then return end if not e:GetHandler():IsRelateToEffect(e) then return end
local ct=e:GetLabel() local ct=e:GetLabel()
e:GetLabelObject():SetValue(ct*200) e:GetLabelObject():SetValue(ct*200)
e:GetLabelObject():GetLabelObject():SetValue(ct*200)
e:SetLabel(ct+1) e:SetLabel(ct+1)
end end
...@@ -5,7 +5,6 @@ function c64681432.initial_effect(c) ...@@ -5,7 +5,6 @@ function c64681432.initial_effect(c)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_SPSUMMON_CONDITION) e1:SetCode(EFFECT_SPSUMMON_CONDITION)
e1:SetValue(aux.FALSE)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--summon,flip --summon,flip
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
...@@ -30,7 +29,7 @@ function c64681432.initial_effect(c) ...@@ -30,7 +29,7 @@ function c64681432.initial_effect(c)
end end
function c64681432.descost(e,tp,eg,ep,ev,re,r,rp,chk) function c64681432.descost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end if chk==0 then return true end
Duel.PayLPCost(tp,Duel.GetLP(tp)/2) Duel.PayLPCost(tp,math.floor(Duel.GetLP(tp)/2))
end end
function c64681432.destg(e,tp,eg,ep,ev,re,r,rp,chk) function c64681432.destg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler() local c=e:GetHandler()
......
...@@ -33,7 +33,7 @@ function c72497366.nttg(e,c) ...@@ -33,7 +33,7 @@ function c72497366.nttg(e,c)
return c:IsLevelAbove(5) and c:IsRace(RACE_FIEND) return c:IsLevelAbove(5) and c:IsRace(RACE_FIEND)
end end
function c72497366.ntop(e,tp,eg,ep,ev,re,r,rp,c) function c72497366.ntop(e,tp,eg,ep,ev,re,r,rp,c)
e:GetHandler():RegisterFlagEffect(72497366,RESET_PHASE+PHASE_END,0,1) e:GetHandler():RegisterFlagEffect(72497366,RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END,0,1)
end end
function c72497366.reptg(e,tp,eg,ep,ev,re,r,rp,chk) function c72497366.reptg(e,tp,eg,ep,ev,re,r,rp,chk)
local tc=eg:GetFirst() local tc=eg:GetFirst()
......
...@@ -20,10 +20,10 @@ function c89258225.filter(c) ...@@ -20,10 +20,10 @@ function c89258225.filter(c)
return c:IsFaceup() and c:IsRace(RACE_FIEND) return c:IsFaceup() and c:IsRace(RACE_FIEND)
end end
function c89258225.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c89258225.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c89258225.filter(chkc) end if chkc then return chkc:IsLocation(LOCATION_MZONE) and c89258225.filter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c89258225.filter,tp,LOCATION_MZONE,0,1,e:GetHandler()) end if chk==0 then return Duel.IsExistingTarget(c89258225.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,e:GetHandler()) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
Duel.SelectTarget(tp,c89258225.filter,tp,LOCATION_MZONE,0,1,1,nil) Duel.SelectTarget(tp,c89258225.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
end end
function c89258225.operation(e,tp,eg,ep,ev,re,r,rp) function c89258225.operation(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
......
...@@ -16,7 +16,7 @@ function c8949584.condition(e,tp,eg,ep,ev,re,r,rp) ...@@ -16,7 +16,7 @@ function c8949584.condition(e,tp,eg,ep,ev,re,r,rp)
end end
function c8949584.cost(e,tp,eg,ep,ev,re,r,rp,chk) function c8949584.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end if chk==0 then return true end
Duel.PayLPCost(tp,Duel.GetLP(tp)/2) Duel.PayLPCost(tp,math.floor(Duel.GetLP(tp)/2))
end end
function c8949584.filter(c,e,tp) function c8949584.filter(c,e,tp)
return c:IsSetCard(0x3008) and c:IsLevelBelow(4) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) return c:IsSetCard(0x3008) and c:IsLevelBelow(4) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
......
...@@ -47,16 +47,16 @@ end ...@@ -47,16 +47,16 @@ end
function c94092230.ttop(e,tp,eg,ep,ev,re,r,rp,c) function c94092230.ttop(e,tp,eg,ep,ev,re,r,rp,c)
local g=Duel.SelectTribute(tp,c,3,3) local g=Duel.SelectTribute(tp,c,3,3)
c:SetMaterial(g) c:SetMaterial(g)
Duel.Release(g, REASON_SUMMON+REASON_MATERIAL) Duel.Release(g,REASON_SUMMON+REASON_MATERIAL)
end end
function c94092230.descost(e,tp,eg,ep,ev,re,r,rp,chk) function c94092230.descost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end if chk==0 then return true end
Duel.PayLPCost(tp,Duel.GetLP(tp)/2) Duel.PayLPCost(tp,math.floor(Duel.GetLP(tp)/2))
end end
function c94092230.destg(e,tp,eg,ep,ev,re,r,rp,chk) function c94092230.destg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDestructable,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,e:GetHandler()) end if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDestructable,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,e:GetHandler()) end
local g=Duel.GetMatchingGroup(Card.IsDestructable,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,e:GetHandler()) local g=Duel.GetMatchingGroup(Card.IsDestructable,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,e:GetHandler())
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0,nil) Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0)
end end
function c94092230.desop(e,tp,eg,ep,ev,re,r,rp) function c94092230.desop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(Card.IsDestructable,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,e:GetHandler()) local g=Duel.GetMatchingGroup(Card.IsDestructable,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,e:GetHandler())
......
...@@ -19,8 +19,8 @@ end ...@@ -19,8 +19,8 @@ end
function c97922283.condition(e,tp,eg,ep,ev,re,r,rp) function c97922283.condition(e,tp,eg,ep,ev,re,r,rp)
local tc=eg:GetFirst() local tc=eg:GetFirst()
local bc=tc:GetBattleTarget() local bc=tc:GetBattleTarget()
return tc:IsRelateToBattle() and tc:IsControler(tp) and tc:IsRace(RACE_BEAST) return tc:IsRelateToBattle() and tc:IsControler(tp)
and bc:IsLocation(LOCATION_GRAVE) and bc:IsReason(REASON_BATTLE) and bc:IsLocation(LOCATION_GRAVE) and bc:IsReason(REASON_BATTLE) and bc:IsType(TYPE_MONSTER)
end end
function c97922283.filter(c) function c97922283.filter(c)
return c:IsFaceup() and c:IsRace(RACE_BEAST) return c:IsFaceup() and c:IsRace(RACE_BEAST)
......
...@@ -13,7 +13,7 @@ end ...@@ -13,7 +13,7 @@ end
function c99789342.cost(e,tp,eg,ep,ev,re,r,rp,chk) function c99789342.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return not Duel.CheckSummonActivity(tp) if chk==0 then return not Duel.CheckSummonActivity(tp)
and not Duel.CheckFlipSummonActivity(tp) and not Duel.CheckSpecialSummonActivity(tp) end and not Duel.CheckFlipSummonActivity(tp) and not Duel.CheckSpecialSummonActivity(tp) end
Duel.PayLPCost(tp,Duel.GetLP(tp)/2) Duel.PayLPCost(tp,math.floor(Duel.GetLP(tp)/2))
local e1=Effect.CreateEffect(e:GetHandler()) local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD) e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH)
......
...@@ -49,7 +49,7 @@ end ...@@ -49,7 +49,7 @@ end
function Auxiliary.BeginPuzzle(effect) function Auxiliary.BeginPuzzle(effect)
local e1=Effect.GlobalEffect() local e1=Effect.GlobalEffect()
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_PHASE+PHASE_END) e1:SetCode(EVENT_TURN_END)
e1:SetCountLimit(1) e1:SetCountLimit(1)
e1:SetOperation(Auxiliary.PuzzleOp) e1:SetOperation(Auxiliary.PuzzleOp)
Duel.RegisterEffect(e1,0) Duel.RegisterEffect(e1,0)
......
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