Commit 4fc5104f authored by VanillaSalt's avatar VanillaSalt

fix

parent b29efbbc
......@@ -6,10 +6,15 @@ function c11012887.initial_effect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_BATTLE_DESTROYING)
e1:SetCondition(c11012887.condition)
e1:SetTarget(c11012887.target)
e1:SetOperation(c11012887.operation)
c:RegisterEffect(e1)
end
function c11012887.condition(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsRelateToBattle() and c:GetBattleTarget():IsType(TYPE_MONSTER)
end
function c11012887.filter(c,e,tp)
return c:IsSetCard(0x22) and c:IsAttackBelow(1700) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
......
......@@ -6,10 +6,15 @@ function c12079734.initial_effect(c)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCode(EVENT_BATTLE_DESTROYING)
e1:SetCondition(c12079734.condition)
e1:SetTarget(c12079734.target)
e1:SetOperation(c12079734.operation)
c:RegisterEffect(e1)
end
function c12079734.condition(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsRelateToBattle() and c:GetBattleTarget():IsType(TYPE_MONSTER)
end
function c12079734.filter1(c,ec)
return c:IsType(TYPE_UNION) and c:CheckEquipTarget(ec)
end
......
......@@ -17,6 +17,7 @@ function c1945387.initial_effect(c)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e3:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e3:SetCode(EVENT_BATTLE_DESTROYING)
e3:SetCondition(c1945387.drcon)
e3:SetTarget(c1945387.drtg)
e3:SetOperation(c1945387.drop)
c:RegisterEffect(e3)
......@@ -24,6 +25,10 @@ end
function c1945387.splimit(e,se,sp,st)
return bit.band(st,SUMMON_TYPE_FUSION)==SUMMON_TYPE_FUSION
end
function c1945387.drcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsRelateToBattle() and c:GetBattleTarget():IsType(TYPE_MONSTER)
end
function c1945387.drtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetTargetPlayer(tp)
......
......@@ -15,7 +15,7 @@ function c218704.initial_effect(c)
e2:SetDescription(aux.Stringid(218704,0))
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e2:SetCode(EVENT_BATTLE_DESTROYING)
e2:SetRange(LOCATION_MZONE)
e2:SetCondition(c218704.skipcon)
e2:SetOperation(c218704.skipop)
c:RegisterEffect(e2)
end
......@@ -33,6 +33,10 @@ function c218704.spop(e,tp,eg,ep,ev,re,r,rp,c)
local g=Duel.SelectMatchingCard(tp,c218704.spfilter,tp,LOCATION_GRAVE,0,2,2,nil)
Duel.Remove(g,POS_FACEUP,REASON_COST)
end
function c218704.skipcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsRelateToBattle() and c:GetBattleTarget():IsType(TYPE_MONSTER)
end
function c218704.skipop(e,tp,eg,ep,ev,re,r,rp)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
......
......@@ -26,6 +26,7 @@ function c25853045.initial_effect(c)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetProperty(EFFECT_FLAG_CARD_TARGET)
e3:SetCode(EVENT_BATTLE_DESTROYING)
e3:SetCondition(c25853045.descon)
e3:SetTarget(c25853045.destg)
e3:SetOperation(c25853045.desop)
c:RegisterEffect(e3)
......@@ -44,6 +45,10 @@ function c25853045.reptg(e,tp,eg,ep,ev,re,r,rp,chk)
return true
else return false end
end
function c25853045.descon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsRelateToBattle() and c:GetBattleTarget():IsType(TYPE_MONSTER)
end
function c25853045.filter(c)
return c:IsDestructable() and c:IsType(TYPE_SPELL+TYPE_TRAP)
end
......
......@@ -5,9 +5,14 @@ function c26669055.initial_effect(c)
e1:SetDescription(aux.Stringid(26669055,0))
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e1:SetCode(EVENT_BATTLE_DESTROYING)
e1:SetCondition(c26669055.condition)
e1:SetOperation(c26669055.operation)
c:RegisterEffect(e1)
end
function c26669055.condition(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsRelateToBattle() and c:GetBattleTarget():IsType(TYPE_MONSTER)
end
function c26669055.operation(e,tp,eg,ep,ev,re,r,rp)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
......
......@@ -17,6 +17,7 @@ function c3019642.initial_effect(c)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e2:SetCode(EVENT_BATTLE_DESTROYING)
e2:SetCondition(c3019642.damcon)
e2:SetTarget(c3019642.damtg)
e2:SetOperation(c3019642.damop)
c:RegisterEffect(e2)
......@@ -69,6 +70,10 @@ end
function c3019642.repval(e,re,r,rp)
return bit.band(r,REASON_BATTLE)~=0
end
function c3019642.damcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsRelateToBattle() and c:GetBattleTarget():IsType(TYPE_MONSTER)
end
function c3019642.damtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetTargetPlayer(1-tp)
......
......@@ -16,6 +16,7 @@ function c32314730.initial_effect(c)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_BATTLE_DESTROYING)
e2:SetCondition(c32314730.thcon)
e2:SetTarget(c32314730.thtg)
e2:SetOperation(c32314730.thop)
c:RegisterEffect(e2)
......@@ -53,6 +54,10 @@ function c32314730.ccost(e,tp)
Duel.Destroy(e:GetHandler(),REASON_RULE)
end
end
function c32314730.thcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsRelateToBattle() and c:GetBattleTarget():IsType(TYPE_MONSTER)
end
function c32314730.filter(c)
return c:IsSetCard(0x1d) and c:IsAbleToHand()
end
......
......@@ -4,10 +4,15 @@ function c35514096.initial_effect(c)
e1:SetDescription(aux.Stringid(35514096,0))
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e1:SetCode(EVENT_BATTLE_DESTROYING)
e1:SetCondition(c35514096.condition)
e1:SetTarget(c35514096.target)
e1:SetOperation(c35514096.operation)
c:RegisterEffect(e1)
end
function c35514096.condition(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsRelateToBattle() and c:GetBattleTarget():IsType(TYPE_MONSTER)
end
function c35514096.filter(c)
return c:IsFacedown() and c:IsDestructable()
end
......
......@@ -65,6 +65,7 @@ function c37115575.initial_effect(c)
e9:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e9:SetCategory(CATEGORY_DESTROY)
e9:SetCode(EVENT_BATTLE_DESTROYING)
e9:SetCondition(c37115575.decon)
e9:SetTarget(c37115575.detg)
e9:SetOperation(c37115575.deop)
c:RegisterEffect(e9)
......@@ -108,6 +109,10 @@ end
function c37115575.destarget(e,c)
return c:IsSetCard(0x23) and c:GetFieldID()>e:GetHandler():GetFieldID()
end
function c37115575.decon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsRelateToBattle() and c:GetBattleTarget():IsType(TYPE_MONSTER)
end
function c37115575.defilter(c)
return c:IsFaceup() and c:IsDestructable()
end
......
......@@ -13,7 +13,9 @@ function c39761138.initial_effect(c)
c:RegisterEffect(e1)
end
function c39761138.rmcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(Card.IsSetCard,tp,LOCATION_GRAVE,0,3,nil,0x2c)
local c=e:GetHandler()
return c:IsRelateToBattle() and c:GetBattleTarget():IsType(TYPE_MONSTER)
and Duel.IsExistingMatchingCard(Card.IsSetCard,tp,LOCATION_GRAVE,0,3,nil,0x2c)
end
function c39761138.rmtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(1-tp) and chkc:IsAbleToRemove() end
......
......@@ -14,7 +14,7 @@ function c43225434.condition(e,tp,eg,ep,ev,re,r,rp)
local a=Duel.GetAttacker()
local at=Duel.GetAttackTarget()
return at and ((a:IsControler(tp) and a:IsType(TYPE_FUSION))
or (at:IsControler(tp) and at:IsFaceup() and a:IsType(TYPE_FUSION)))
or (at:IsControler(tp) and at:IsFaceup() and at:IsType(TYPE_FUSION)))
end
function c43225434.activate(e,tp,eg,ep,ev,re,r,rp)
local a=Duel.GetAttacker()
......
......@@ -14,10 +14,9 @@ function c52786469.initial_effect(c)
end
function c52786469.condition(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local d=Duel.GetAttackTarget()
if d==c then d=Duel.GetAttacker() end
e:SetLabel(d:GetAttack())
return true
local bc=c:GetBattleTarget()
e:SetLabel(bc:GetAttack())
return c:IsRelateToBattle() and bc:IsType(TYPE_MONSTER)
end
function c52786469.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
......
......@@ -18,7 +18,7 @@ end
function c53981499.damcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local bc=c:GetBattleTarget()
return bc:IsType(TYPE_MONSTER)
return c:IsRelateToBattle() and bc:IsType(TYPE_MONSTER)
end
function c53981499.damtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
......
......@@ -24,6 +24,7 @@ function c54702678.initial_effect(c)
e3:SetCode(EVENT_BATTLE_DESTROYING)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e3:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e3:SetCondition(c54702678.damcon)
e3:SetTarget(c54702678.damtg)
e3:SetOperation(c54702678.damop)
c:RegisterEffect(e3)
......@@ -53,6 +54,10 @@ function c54702678.disop(e,tp,eg,ep,ev,re,r,rp)
e2:SetReset(RESET_EVENT+0x57a0000)
bc:RegisterEffect(e2,true)
end
function c54702678.damcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsRelateToBattle() and c:GetBattleTarget():IsType(TYPE_MONSTER)
end
function c54702678.damtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetTargetPlayer(1-tp)
......
......@@ -5,9 +5,14 @@ function c62054060.initial_effect(c)
e1:SetDescription(aux.Stringid(62054060,0))
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e1:SetCode(EVENT_BATTLE_DESTROYING)
e1:SetCondition(c62054060.condition)
e1:SetOperation(c62054060.operation)
c:RegisterEffect(e1)
end
function c62054060.condition(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsRelateToBattle() and c:GetBattleTarget():IsType(TYPE_MONSTER)
end
function c62054060.operation(e,tp,eg,ep,ev,re,r,rp)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
......
......@@ -14,6 +14,7 @@ function c62742651.initial_effect(c)
e2:SetCategory(CATEGORY_DAMAGE+CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e2:SetCode(EVENT_BATTLE_DESTROYING)
e2:SetCondition(c62742651.damcon)
e2:SetTarget(c62742651.damtg)
e2:SetOperation(c62742651.damop)
c:RegisterEffect(e2)
......@@ -26,6 +27,10 @@ function c62742651.ntcon(e,c)
return c:GetLevel()>4 and Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c62742651.ntfilter,c:GetControler(),LOCATION_MZONE,0,1,nil)
end
function c62742651.damcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsRelateToBattle() and c:GetBattleTarget():IsType(TYPE_MONSTER)
end
function c62742651.damtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
local bc=e:GetHandler():GetBattleTarget()
......
......@@ -28,9 +28,7 @@ function c6588580.val(e,c)
end
function c6588580.damcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local t=Duel.GetAttackTarget()
if ev==1 then t=Duel.GetAttacker() end
return t:IsType(TYPE_MONSTER)
return c:IsRelateToBattle() and c:GetBattleTarget():IsType(TYPE_MONSTER)
end
function c6588580.damtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
......
......@@ -6,10 +6,15 @@ function c71106375.initial_effect(c)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCode(EVENT_BATTLE_DESTROYING)
e1:SetCondition(c71106375.thcon)
e1:SetTarget(c71106375.thtg)
e1:SetOperation(c71106375.thop)
c:RegisterEffect(e1)
end
function c71106375.thcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsRelateToBattle() and c:GetBattleTarget():IsType(TYPE_MONSTER)
end
function c71106375.filter(c)
return c:IsFacedown() and c:IsAbleToHand()
end
......
......@@ -17,10 +17,15 @@ function c73483491.initial_effect(c)
e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_BATTLE_DESTROYING)
e2:SetCondition(c73483491.thcon)
e2:SetTarget(c73483491.thtg)
e2:SetOperation(c73483491.thop)
c:RegisterEffect(e2)
end
function c73483491.thcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsRelateToBattle() and c:GetBattleTarget():IsType(TYPE_MONSTER)
end
function c73483491.filter(c)
return c:IsSetCard(0x2) and c:IsAbleToHand()
end
......
......@@ -6,10 +6,15 @@ function c74440055.initial_effect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e1:SetCode(EVENT_BATTLE_DESTROYING)
e1:SetCondition(c74440055.condition)
e1:SetTarget(c74440055.target)
e1:SetOperation(c74440055.operation)
c:RegisterEffect(e1)
end
function c74440055.condition(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsRelateToBattle() and c:GetBattleTarget():IsType(TYPE_MONSTER)
end
function c74440055.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,0,0)
......
......@@ -15,6 +15,7 @@ function c76925842.initial_effect(c)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e2:SetCode(EVENT_BATTLE_DESTROYING)
e2:SetCondition(c76925842.drcon)
e2:SetCost(c76925842.drcost)
e2:SetTarget(c76925842.drtg)
e2:SetOperation(c76925842.drop)
......@@ -23,6 +24,10 @@ end
function c76925842.atkval(e,c)
return Duel.GetMatchingGroupCount(Card.IsAttribute,c:GetControler(),LOCATION_GRAVE,0,nil,ATTRIBUTE_DARK)*100
end
function c76925842.drcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsRelateToBattle() and c:GetBattleTarget():IsType(TYPE_MONSTER)
end
function c76925842.rfilter(c)
return c:IsAttribute(ATTRIBUTE_DARK) and c:IsAbleToRemoveAsCost()
end
......
......@@ -31,7 +31,7 @@ function c80651316.atkop(e,tp,eg,ep,ev,re,r,rp)
e2:SetCode(EVENT_BATTLE_DESTROYING)
e2:SetTarget(c80651316.schtg)
e2:SetOperation(c80651316.schop)
e2:SetReset(RESET_EVENT+0x1620000)
e2:SetReset(RESET_EVENT+0x1ff0000)
c:RegisterEffect(e2)
end
function c80651316.sfilter(c)
......
......@@ -5,8 +5,8 @@ function c84055227.initial_effect(c)
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(84055227,0))
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e1:SetRange(LOCATION_MZONE)
e1:SetCode(EVENT_BATTLE_DESTROYING)
e1:SetCondition(c84055227.condition)
e1:SetOperation(c84055227.operation)
c:RegisterEffect(e1)
--attackup
......@@ -18,6 +18,10 @@ function c84055227.initial_effect(c)
e2:SetValue(c84055227.attackup)
c:RegisterEffect(e2)
end
function c84055227.condition(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsRelateToBattle() and c:GetBattleTarget():IsType(TYPE_MONSTER)
end
function c84055227.operation(e,tp,eg,ep,ev,re,r,rp)
e:GetHandler():AddCounter(0x3001,1)
end
......
......@@ -4,16 +4,21 @@ function c93130021.initial_effect(c)
e1:SetDescription(aux.Stringid(93130021,0))
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e1:SetCode(EVENT_BATTLE_DESTROYING)
e1:SetCondition(c93130021.condition)
e1:SetTarget(c93130021.target)
e1:SetOperation(c93130021.operation)
c:RegisterEffect(e1)
end
function c93130021.condition(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsRelateToBattle() and c:GetBattleTarget():IsType(TYPE_MONSTER)
end
function c93130021.filter(c)
return c:IsFaceup() and c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsDestructable()
end
function c93130021.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsOnField() and c93130021.filter(chkc) end
if chk==0 then return e:GetHandler():IsRelateToBattle() end
if chk==0 then return true end
local c=e:GetHandler()
local t1=Duel.IsExistingTarget(c93130021.filter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil)
local t2=Duel.GetLocationCount(tp,LOCATION_MZONE)>0
......
--雪暴战士
--ブリザード・ウォリアー
function c96565487.initial_effect(c)
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(96565487,0))
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e1:SetCode(EVENT_BATTLE_DESTROYING)
e1:SetCondition(c96565487.condition)
e1:SetOperation(c96565487.operation)
c:RegisterEffect(e1)
end
function c96565487.condition(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsRelateToBattle() and c:GetBattleTarget():IsType(TYPE_MONSTER)
end
function c96565487.operation(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetDecktopGroup(1-tp,1)
if g:GetCount()==0 then return 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