Commit 222656c2 authored by DailyShana's avatar DailyShana

fix

parent cdf6f8d7
......@@ -12,6 +12,7 @@ function c27541563.initial_effect(c)
e2:SetCategory(CATEGORY_NEGATE+CATEGORY_DESTROY)
e2:SetType(EFFECT_TYPE_ACTIVATE)
e2:SetCode(EVENT_CHAINING)
e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL)
e2:SetCountLimit(1,27541563)
e2:SetCondition(c27541563.discon)
e2:SetCost(c27541563.discost)
......@@ -20,7 +21,6 @@ function c27541563.initial_effect(c)
c:RegisterEffect(e2)
local e3=e2:Clone()
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL)
e3:SetRange(LOCATION_SZONE)
c:RegisterEffect(e3)
--inactivatable
......@@ -53,7 +53,7 @@ function c27541563.discost(e,tp,eg,ep,ev,re,r,rp,chk)
end
function c27541563.distg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_DISABLE,eg,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0)
if re:GetHandler():IsDestructable() and re:GetHandler():IsRelateToEffect(re) then
Duel.SetOperationInfo(0,CATEGORY_DESTROY,eg,1,0,0)
end
......
......@@ -10,11 +10,11 @@ function c31044787.initial_effect(c)
e1:SetOperation(c31044787.activate)
c:RegisterEffect(e1)
end
function c31044787.filter(c)
return c:IsFaceup() and c:GetAttack()>0
function c31044787.filter(c,tp)
return c:IsFaceup() and c:GetAttack()>0 and Duel.IsPlayerCanSendtoDeck(tp,c)
end
function c31044787.condition(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(c31044787.filter,tp,0,LOCATION_MZONE,nil)
local g=Duel.GetMatchingGroup(c31044787.filter,tp,0,LOCATION_MZONE,nil,1-tp)
local atk=g:GetSum(Card.GetAttack)
return atk>Duel.GetLP(tp)
end
......@@ -23,7 +23,7 @@ function c31044787.target(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SetOperationInfo(0,CATEGORY_TODECK,nil,1,1-tp,LOCATION_MZONE)
end
function c31044787.activate(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(c31044787.filter,tp,0,LOCATION_MZONE,nil)
local g=Duel.GetMatchingGroup(c31044787.filter,tp,0,LOCATION_MZONE,nil,1-tp)
local atk=g:GetSum(Card.GetAttack)
local lp=Duel.GetLP(tp)
local diff=atk-lp
......
......@@ -28,18 +28,29 @@ function c31443476.activate(e,tp,eg,ep,ev,re,r,rp)
e1:SetCode(EFFECT_CANNOT_ATTACK)
e1:SetReset(RESET_EVENT+0x1fe0000)
tc:RegisterEffect(e1,true)
tc:RegisterFlagEffect(31443476,RESET_EVENT+0x1fe0000,0,1)
local e2=Effect.CreateEffect(e:GetHandler())
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetRange(LOCATION_MZONE)
e2:SetCode(EVENT_PHASE+PHASE_END)
e2:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE)
e2:SetLabelObject(tc)
e2:SetCondition(c31443476.descon)
e2:SetOperation(c31443476.desop)
e2:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END)
e2:SetCountLimit(1)
tc:RegisterEffect(e2,true)
Duel.RegisterEffect(e2,tp)
Duel.SpecialSummonComplete()
end
end
function c31443476.descon(e,tp,eg,ep,ev,re,r,rp)
local tc=e:GetLabelObject()
if tc:GetFlagEffect(31443476)~=0 then
return true
else
e:Reset()
return false
end
end
function c31443476.desop(e,tp,eg,ep,ev,re,r,rp)
Duel.Destroy(e:GetHandler(),REASON_EFFECT)
Duel.Destroy(e:GetLabelObject(),REASON_EFFECT)
end
......@@ -2,7 +2,7 @@
function c41721210.initial_effect(c)
--fusion material
c:EnableReviveLimit()
aux.AddFusionProcCodeFun(c,46986414,aux.FilterBoolFunction(Card.IsRace,RACE_DRAGON),1,false,false)
aux.AddFusionProcCodeFun(c,46986414,aux.FilterBoolFunction(Card.IsRace,RACE_DRAGON),1,true,true)
--change name
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
......
......@@ -37,7 +37,7 @@ function c52714670.initial_effect(c)
c:RegisterEffect(e4)
end
function c52714670.spcon(e,tp,eg,ep,ev,re,r,rp)
return eg and eg:IsExists(Card.IsControler,1,nil,1-tp)
return eg:IsExists(Card.IsControler,1,nil,1-tp)
end
function c52714670.spfilter(c,e,tp)
return c:IsFaceup() and c:IsSetCard(0x105) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
......@@ -84,7 +84,7 @@ function c52714670.rmcfilter(c,tp)
return c:IsControler(tp) and c:IsFaceup() and c:IsSetCard(0x105)
end
function c52714670.rmcon(e,tp,eg,ep,ev,re,r,rp)
return eg and eg:IsExists(c52714670.rmcfilter,1,e:GetHandler(),tp)
return eg:IsExists(c52714670.rmcfilter,1,e:GetHandler(),tp)
end
function c52714670.rmtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsOnField() and chkc:IsControler(1-tp) and chkc:IsAbleToRemove() end
......
......@@ -60,7 +60,7 @@ function c66719533.effilter(c,tp)
return c:IsFaceup() and c:IsSetCard(0x105) and c:IsControler(tp)
end
function c66719533.effcon(e,tp,eg,ep,ev,re,r,rp)
return eg and eg:IsExists(c66719533.effilter,1,nil,tp)
return eg:IsExists(c66719533.effilter,1,nil,tp)
end
function c66719533.atkcon(e,tp,eg,ep,ev,re,r,rp)
return c66719533.effcon(e,tp,eg,ep,ev,re,r,rp) and Duel.GetTurnPlayer()==tp
......
......@@ -31,7 +31,6 @@ function c80143954.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
end
function c80143954.activate(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsLocation(LOCATION_SZONE) then return end
local tc=Duel.GetFirstTarget()
if c:IsRelateToEffect(e) and tc:IsRelateToEffect(e) and tc:IsFaceup() then
Duel.Equip(tp,c,tc)
......
......@@ -77,7 +77,7 @@ end
function c89320376.posop1(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) then return end
local tc=Duel.GetFirstTarget()
if tc and tc:IsRelateToEffect(e) and tc:IsFacedown() then
if tc:IsRelateToEffect(e) and tc:IsFacedown() then
local pos1=0
if not tc:IsPosition(POS_FACEUP_ATTACK) then pos1=pos1+POS_FACEUP_ATTACK end
if not tc:IsPosition(POS_FACEUP_DEFENSE) then pos1=pos1+POS_FACEUP_DEFENSE end
......@@ -110,7 +110,7 @@ end
function c89320376.posop2(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) then return end
local tc=Duel.GetFirstTarget()
if tc and tc:IsFaceup() and tc:IsRelateToEffect(e) then
if tc:IsFaceup() and tc:IsRelateToEffect(e) then
Duel.ChangePosition(tc,POS_FACEDOWN_DEFENSE)
end
end
......@@ -6,7 +6,7 @@ function c91269402.initial_effect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(TIMING_END_PHASE)
e1:SetCountLimit(1,91269402)
e1:SetCountLimit(1,91269402+EFFECT_COUNT_CODE_OATH)
e1:SetCondition(c91269402.condition)
e1:SetTarget(c91269402.target)
e1:SetOperation(c91269402.activate)
......
......@@ -19,9 +19,6 @@ function c91665064.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
Duel.SelectTarget(tp,c91665064.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
end
function c91665064.activate(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if not tc:IsRelateToEffect(e) then return end
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CHANGE_DAMAGE)
......@@ -30,6 +27,8 @@ function c91665064.activate(e,tp,eg,ep,ev,re,r,rp)
e1:SetValue(c91665064.damval)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
local tc=Duel.GetFirstTarget()
if not tc:IsRelateToEffect(e) then return end
local e2=Effect.CreateEffect(e:GetHandler())
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_INDESTRUCTABLE_BATTLE)
......
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