Commit a7da0e4c authored by VanillaSalt's avatar VanillaSalt

fix

parent 42842817
......@@ -67,10 +67,14 @@ function c29071332.eqop(e,tp,eg,ep,ev,re,r,rp)
e4:SetType(EFFECT_TYPE_SINGLE)
e4:SetCode(EFFECT_EQUIP_LIMIT)
e4:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e4:SetValue(1)
e4:SetValue(c29071332.eqlimit)
e4:SetReset(RESET_EVENT+0x1fe0000)
e4:SetLabelObject(tc)
c:RegisterEffect(e4)
end
function c29071332.eqlimit(e,c)
return c==e:GetLabelObject()
end
function c29071332.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():GetFlagEffect(29071332)==0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,true,false) end
......
......@@ -61,9 +61,9 @@ function c2948263.rdop(e,tp,eg,ep,ev,re,r,rp)
Duel.ChangeBattleDamage(ep,ev/2)
end
function c2948263.discon(e,tp,eg,ep,ev,re,r,rp)
local loc=Duel.GetChainInfo(ev,CHAININFO_TRIGGERING_LOCATION)
local tgp,loc=Duel.GetChainInfo(ev,CHAININFO_TRIGGERING_CONTROLER,CHAININFO_TRIGGERING_LOCATION)
return not e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED) and Duel.IsChainDisablable(ev)
and rp~=tp and re:IsActiveType(TYPE_MONSTER) and loc==LOCATION_MZONE
and tgp~=tp and re:IsActiveType(TYPE_MONSTER) and loc==LOCATION_MZONE
end
function c2948263.distg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
......
......@@ -53,6 +53,7 @@ function c32919136.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,0,0)
end
function c32919136.operation(e,tp,eg,ep,ev,re,r,rp)
if c32919136.descon(e) then return end
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if c:IsRelateToEffect(e) and tc:IsFaceup() and tc:IsRelateToEffect(e) then
......
......@@ -16,7 +16,7 @@ function c46668237.initial_effect(c)
end
function c46668237.cfilter(c,tp)
return c:IsType(TYPE_MONSTER) and c:IsRace(RACE_BEAST) and c:GetPreviousControler()==tp and c:IsPreviousPosition(POS_FACEUP)
and bit.band(c:GetPreviousRaceOnField(),RACE_BEAST)~=0
and c:IsPreviousLocation(LOCATION_MZONE) and bit.band(c:GetPreviousRaceOnField(),RACE_BEAST)~=0
end
function c46668237.condition(e,tp,eg,ep,ev,re,r,rp)
return not eg:IsContains(e:GetHandler()) and eg:IsExists(c46668237.cfilter,1,nil,tp) and bit.band(r,REASON_DESTROY)~=0
......
......@@ -29,23 +29,20 @@ function c46772449.condition(e,tp,eg,ep,ev,re,r,rp)
end
function c46772449.cost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return c:CheckRemoveOverlayCard(tp,1,REASON_COST) and
c:GetFlagEffect(46772449)==0
end
if chk==0 then return c:CheckRemoveOverlayCard(tp,1,REASON_COST) and c:GetFlagEffect(46772449)==0 end
c:RemoveOverlayCard(tp,1,1,REASON_COST)
c:RegisterFlagEffect(46772449,RESET_CHAIN,0,1)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CHANGE_DAMAGE)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH)
e1:SetTargetRange(0,1)
e1:SetValue(0)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
function c46772449.target(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())
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0)
end
......
......@@ -41,10 +41,10 @@ function c50260683.filter(c)
return c:IsFaceup() and c:GetAttack()>0
end
function c50260683.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(1-tp) and chkc:IsLocation(LOCATION_MZONE) and chkc:IsFaceup() end
if chkc then return chkc:IsControler(1-tp) and chkc:IsLocation(LOCATION_MZONE) and c50260683.filter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c50260683.filter,tp,0,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
Duel.SelectTarget(tp,Card.IsFaceup,tp,0,LOCATION_MZONE,1,1,nil)
Duel.SelectTarget(tp,c50260683.filter,tp,0,LOCATION_MZONE,1,1,nil)
end
function c50260683.operation(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
......
......@@ -60,6 +60,15 @@ function c69058960.operation(e,tp,eg,ep,ev,re,r,rp)
e2:SetCode(EFFECT_MUST_BE_ATTACKED)
e2:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END)
c:RegisterEffect(e2)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD)
e3:SetCode(EFFECT_CANNOT_EP)
e3:SetRange(LOCATION_MZONE)
e3:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e3:SetTargetRange(0,1)
e3:SetCondition(c69058960.atcon)
e3:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END)
c:RegisterEffect(e3)
end
function c69058960.filter(c)
return c:IsFaceup() and c:IsCode(95442074)
......@@ -71,3 +80,6 @@ function c69058960.refcon(e)
return Duel.IsExistingMatchingCard(c69058960.filter,e:GetHandlerPlayer(),LOCATION_MZONE,0,1,nil)
and Duel.GetAttackTarget()==e:GetHandler()
end
function c69058960.atcon(e)
return Duel.IsExistingMatchingCard(Card.IsAttackable,e:GetHandlerPlayer(),0,LOCATION_MZONE,1,nil)
end
......@@ -35,10 +35,9 @@ function c69170557.destg(e,tp,eg,ep,ev,re,r,rp,chk)
end
function c69170557.desop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(c69170557.desfilter,tp,LOCATION_MZONE,LOCATION_MZONE,nil)
Duel.Destroy(g,REASON_EFFECT)
if Duel.Destroy(g,REASON_EFFECT)==0 then return end
local og=Duel.GetOperatedGroup():Filter(Card.IsLocation,nil,LOCATION_GRAVE)
Duel.Draw(tp,1,REASON_EFFECT)
if og:GetCount()>0 then
if Duel.Draw(tp,1,REASON_EFFECT)~=0 and og:GetCount()>0 then
Duel.BreakEffect()
local mg,matk=og:GetMaxGroup(Card.GetBaseAttack)
if matk>0 then
......
--No.40 ギミック・パペット-ヘブンズ・ストリングス
function c75433814.initial_effect(c)
--synchro summon
--xyz summon
aux.AddXyzProcedure(c,aux.XyzFilterFunction(c,8),2)
c:EnableReviveLimit()
--counter
......
--No.6 先史遺産アトランタル
function c9161357.initial_effect(c)
--synchro summon
--xyz summon
aux.AddXyzProcedure(c,aux.XyzFilterFunction(c,6),2)
c:EnableReviveLimit()
--equip
......
......@@ -13,6 +13,24 @@ function c93108839.initial_effect(c)
e1:SetTarget(c93108839.eqtg)
e1:SetOperation(c93108839.eqop)
c:RegisterEffect(e1)
--direct
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_EQUIP)
e2:SetCode(EFFECT_DIRECT_ATTACK)
c:RegisterEffect(e2)
--damage
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(93108839,2))
e3:SetCategory(CATEGORY_DAMAGE)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_BATTLE_DAMAGE)
e3:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e3:SetRange(LOCATION_SZONE)
e3:SetCondition(c93108839.damcon)
e3:SetCost(c93108839.damcost)
e3:SetTarget(c93108839.damtg)
e3:SetOperation(c93108839.damop)
c:RegisterEffect(e3)
end
function c93108839.filter(c)
return c:IsFaceup() and c:IsType(TYPE_XYZ)
......@@ -30,7 +48,7 @@ function c93108839.eqop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if not c:IsRelateToEffect(e) or c:IsFacedown() then return end
if not tc:IsRelateToEffect(e) or tc:IsFacedown() then
if not tc:IsRelateToEffect(e) or tc:IsFacedown() or tc:IsControler(1-tp) then
Duel.SendtoGrave(c,REASON_EFFECT)
return
end
......@@ -45,26 +63,6 @@ function c93108839.eqop(e,tp,eg,ep,ev,re,r,rp)
e1:SetOperation(c93108839.spop)
e1:SetReset(RESET_EVENT+0x1fe0000)
c:RegisterEffect(e1)
--direct
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_EQUIP)
e2:SetCode(EFFECT_DIRECT_ATTACK)
e2:SetReset(RESET_EVENT+0x1fe0000)
c:RegisterEffect(e2)
--damage
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(93108839,2))
e3:SetCategory(CATEGORY_DAMAGE)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_BATTLE_DAMAGE)
e3:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e3:SetRange(LOCATION_SZONE)
e3:SetCondition(c93108839.damcon)
e3:SetCost(c93108839.damcost)
e3:SetTarget(c93108839.damtg)
e3:SetOperation(c93108839.damop)
e3:SetReset(RESET_EVENT+0x1fe0000)
c:RegisterEffect(e3)
--eqlimit
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_SINGLE)
......@@ -72,10 +70,11 @@ function c93108839.eqop(e,tp,eg,ep,ev,re,r,rp)
e4:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e4:SetValue(c93108839.eqlimit)
e4:SetReset(RESET_EVENT+0x1fe0000)
e4:SetLabelObject(tc)
c:RegisterEffect(e4)
end
function c93108839.eqlimit(e,c)
return c:IsType(TYPE_XYZ)
return c==e:GetLabelObject()
end
function c93108839.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():GetFlagEffect(93108839)==0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
......
......@@ -69,16 +69,16 @@ function c94212438.operation(e,tp,eg,ep,ev,re,r,rp)
end
end
end
function c94212438.cfilter2(c)
function c94212438.cfilter2(c,tp)
local code=c:GetCode()
return code==94212438 or code==31893528 or code==67287533 or code==94772232 or code==30170981
return (code==94212438 or code==31893528 or code==67287533 or code==94772232 or code==30170981) and c:IsControler(tp)
end
function c94212438.cfilter3(c)
local code=c:GetCode()
return c:IsFaceup() and (code==94212438 or code==31893528 or code==67287533 or code==94772232 or code==30170981)
end
function c94212438.tgcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c94212438.cfilter2,1,nil)
return eg:IsExists(c94212438.cfilter2,1,nil,tp)
end
function c94212438.tgop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(c94212438.cfilter3,tp,LOCATION_SZONE,0,nil)
......
......@@ -60,6 +60,15 @@ function c95442074.operation(e,tp,eg,ep,ev,re,r,rp)
e2:SetCode(EFFECT_MUST_BE_ATTACKED)
e2:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END)
c:RegisterEffect(e2)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD)
e3:SetCode(EFFECT_CANNOT_EP)
e3:SetRange(LOCATION_MZONE)
e3:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e3:SetTargetRange(0,1)
e3:SetCondition(c95442074.atcon)
e3:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END)
c:RegisterEffect(e3)
end
function c95442074.filter(c)
return c:IsFaceup() and c:IsCode(69058960)
......@@ -71,3 +80,6 @@ function c95442074.refcon(e)
return Duel.IsExistingMatchingCard(c95442074.filter,e:GetHandlerPlayer(),LOCATION_MZONE,0,1,nil)
and Duel.GetAttackTarget()==e:GetHandler()
end
function c95442074.atcon(e)
return Duel.IsExistingMatchingCard(Card.IsAttackable,e:GetHandlerPlayer(),0,LOCATION_MZONE,1,nil)
end
......@@ -16,12 +16,12 @@ function c9748752.condition(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetSummonType()==SUMMON_TYPE_ADVANCE
end
function c9748752.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsOnField() and chkc:IsAbleToRemove() end
if chkc then return chkc:IsOnField() end
if chk==0 then return true end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectTarget(tp,nil,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil)
local tc=g:GetFirst()
if tc then
if tc and tc:IsAbleToRemove() then
Duel.SetOperationInfo(0,CATEGORY_REMOVE,tc,1,0,0)
if tc:IsFaceup() and tc:IsAttribute(ATTRIBUTE_DARK) then
Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,1000)
......@@ -32,7 +32,7 @@ function c9748752.operation(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc and tc:IsRelateToEffect(e) then
Duel.Remove(tc,POS_FACEUP,REASON_EFFECT)
if tc:IsType(TYPE_MONSTER) and tc:IsAttribute(ATTRIBUTE_DARK) then
if tc:IsLocation(LOCATION_REMOVED) and tc:IsType(TYPE_MONSTER) and tc:IsAttribute(ATTRIBUTE_DARK) then
Duel.Damage(1-tp,1000,REASON_EFFECT)
end
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