Commit 591fa286 authored by salix5's avatar salix5

fix

parent 5b22dffc
......@@ -30,7 +30,7 @@ end
function c14730606.drcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsPreviousLocation(LOCATION_ONFIELD) and c:IsPreviousPosition(POS_FACEUP)
and c:GetPreviousControler()==tp and c:IsReason(REASON_DESTROY) and rp~=tp and c:IsStatus(STATUS_ACTIVATED)
and c:GetPreviousControler()==tp and c:IsReason(REASON_DESTROY) and rp~=tp
end
function c14730606.drtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
......
......@@ -21,8 +21,9 @@ function c36378044.initial_effect(c)
c:RegisterEffect(e2)
--life lost
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e3:SetCode(EVENT_DESTROYED)
e3:SetCondition(c36378044.descon)
e3:SetOperation(c36378044.desop)
c:RegisterEffect(e3)
end
......@@ -53,12 +54,13 @@ function c36378044.atkop(e,tp,eg,ep,ev,re,r,rp)
Duel.Destroy(e:GetHandler(),REASON_EFFECT)
end
end
function c36378044.desop(e,tp,eg,ep,ev,re,r,rp)
function c36378044.descon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:GetPreviousControler()==tp and c:IsStatus(STATUS_ACTIVATED) then
local lp=Duel.GetLP(tp)
if lp>6000 then lp=lp-6000
else lp=0 end
Duel.SetLP(tp,lp)
end
return c:IsPreviousLocation(LOCATION_ONFIELD) and c:IsPreviousPosition(POS_FACEUP)
end
function c36378044.desop(e,tp,eg,ep,ev,re,r,rp)
local lp=Duel.GetLP(tp)
if lp>6000 then lp=lp-6000
else lp=0 end
Duel.SetLP(tp,lp)
end
......@@ -100,7 +100,7 @@ function c37209439.negop(e,tp,eg,ep,ev,re,r,rp)
Duel.RegisterEffect(e3,tp)
end
function c37209439.distg(e,c)
return c:GetFieldID()~=e:GetLabel() and c:IsType(TYPE_TRAP) and c:IsStatus(STATUS_ACTIVATED)
return c:GetFieldID()~=e:GetLabel() and c:IsType(TYPE_TRAP)
end
function c37209439.disop(e,tp,eg,ep,ev,re,r,rp)
local tl=Duel.GetChainInfo(ev,CHAININFO_TRIGGERING_LOCATION)
......
......@@ -11,10 +11,17 @@ function c47060347.initial_effect(c)
c:RegisterEffect(e1)
--leave
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_LEAVE_FIELD)
e2:SetOperation(c47060347.leave)
e2:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_SINGLE)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e2:SetCode(EVENT_LEAVE_FIELD_P)
e2:SetOperation(c47060347.checkop)
c:RegisterEffect(e2)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e3:SetCode(EVENT_LEAVE_FIELD)
e3:SetLabelObject(e2)
e3:SetOperation(c47060347.leave)
c:RegisterEffect(e3)
end
function c47060347.rectg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
......@@ -27,9 +34,14 @@ function c47060347.recop(e,tp,eg,ep,ev,re,r,rp)
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
Duel.Recover(p,d,REASON_EFFECT)
end
function c47060347.checkop(e,tp,eg,ep,ev,re,r,rp)
if e:GetHandler():IsDisabled() then
e:SetLabel(1)
else e:SetLabel(0) end
end
function c47060347.leave(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:GetPreviousControler()==tp and c:IsStatus(STATUS_ACTIVATED) then
if e:GetLabelObject():GetLabel()==0 and c:GetPreviousControler()==tp and c:IsStatus(STATUS_ACTIVATED) then
Duel.Damage(tp,3000,REASON_EFFECT)
end
end
......@@ -31,7 +31,7 @@ function c51452091.initial_effect(c)
c:RegisterEffect(e4)
end
function c51452091.distarget(e,c)
return c~=e:GetHandler() and c:IsType(TYPE_TRAP) and c:IsStatus(STATUS_ACTIVATED)
return c~=e:GetHandler() and c:IsType(TYPE_TRAP)
end
function c51452091.disop(e,tp,eg,ep,ev,re,r,rp)
local tl=Duel.GetChainInfo(ev,CHAININFO_TRIGGERING_LOCATION)
......
......@@ -7,18 +7,30 @@ function c53569894.initial_effect(c)
c:RegisterEffect(e1)
--destroy
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_DESTROY+CATEGORY_REMOVE)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_LEAVE_FIELD)
e2:SetOperation(c53569894.leave)
e2:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_SINGLE)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e2:SetCode(EVENT_LEAVE_FIELD_P)
e2:SetOperation(c53569894.checkop)
c:RegisterEffect(e2)
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_DESTROY+CATEGORY_REMOVE)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e3:SetCode(EVENT_LEAVE_FIELD)
e3:SetLabelObject(e2)
e3:SetOperation(c53569894.leave)
c:RegisterEffect(e3)
end
function c53569894.filter(c)
return c:IsFaceup() and c:IsCode(15013468,51402177) and c:IsDestructable()
return c:IsFaceup() and c:IsCode(15013468,51402177)
end
function c53569894.checkop(e,tp,eg,ep,ev,re,r,rp)
if e:GetHandler():IsDisabled() then
e:SetLabel(1)
else e:SetLabel(0) end
end
function c53569894.leave(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:GetPreviousControler()==tp and c:IsStatus(STATUS_ACTIVATED) then
if e:GetLabelObject():GetLabel()==0 and c:GetPreviousControler()==tp and c:IsStatus(STATUS_ACTIVATED) then
local g=Duel.GetMatchingGroup(c53569894.filter,tp,LOCATION_ONFIELD,0,nil)
Duel.Destroy(g,REASON_EFFECT,LOCATION_REMOVED)
end
......
......@@ -27,10 +27,17 @@ function c73578229.initial_effect(c)
c:RegisterEffect(e3)
--destroy
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e4:SetCode(EVENT_LEAVE_FIELD)
e4:SetOperation(c73578229.desop)
e4:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_SINGLE)
e4:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e4:SetCode(EVENT_LEAVE_FIELD_P)
e4:SetOperation(c73578229.checkop)
c:RegisterEffect(e4)
local e5=Effect.CreateEffect(c)
e5:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e5:SetCode(EVENT_LEAVE_FIELD)
e5:SetLabelObject(e4)
e5:SetOperation(c73578229.desop)
c:RegisterEffect(e5)
end
function c73578229.etarget(e,c)
return e:GetLabelObject():IsContains(c)
......@@ -53,8 +60,13 @@ function c73578229.adjustop(e,tp,eg,ep,ev,re,r,rp)
Duel.AdjustInstantly(e:GetHandler())
Duel.Readjust()
end
function c73578229.checkop(e,tp,eg,ep,ev,re,r,rp)
if e:GetHandler():IsDisabled() then
e:SetLabel(1)
else e:SetLabel(0) end
end
function c73578229.desop(e,tp,eg,ep,ev,re,r,rp)
if e:GetHandler():IsStatus(STATUS_ACTIVATED) then
if e:GetLabelObject():GetLabel()==0 and e:GetHandler():IsStatus(STATUS_ACTIVATED) then
local g=Duel.GetMatchingGroup(Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,nil)
if g:GetCount()>0 then
local ag=g:GetMaxGroup(Card.GetAttack)
......
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