Commit a10d8c56 authored by salix5's avatar salix5

edit

current settings:
1. EVENT_TO_GRAVE is not triggered if the card is returned to grave.
2. in effect::is_activateable()
EFFECT_TYPE_SINGLE + EVENT_TO_GRAVE/EVENT_DESTROYED/EVENT_SPSUMMON_SUCCESS/EVENT_TO_HAND can be activated in damage step by default
parent b00fb09c
......@@ -33,7 +33,7 @@ function c10530913.initial_effect(c)
c:RegisterEffect(e3)
end
function c10530913.cfilter(c)
return c:IsSetCard(0x90) and c:IsType(TYPE_MONSTER) and not c:IsReason(REASON_RETURN)
return c:IsSetCard(0x90) and c:IsType(TYPE_MONSTER)
end
function c10530913.spcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c10530913.cfilter,1,nil)
......
......@@ -6,14 +6,10 @@ function c11548522.initial_effect(c)
e1:SetCategory(CATEGORY_TODECK)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e1:SetCode(EVENT_TO_GRAVE)
e1:SetCondition(c11548522.condition)
e1:SetTarget(c11548522.target)
e1:SetOperation(c11548522.operation)
c:RegisterEffect(e1)
end
function c11548522.condition(e,tp,eg,ep,ev,re,r,rp)
return not e:GetHandler():IsReason(REASON_RETURN)
end
function c11548522.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_TODECK,e:GetHandler(),1,0,0)
......
......@@ -6,14 +6,10 @@ function c12467005.initial_effect(c)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY)
e1:SetCode(EVENT_TO_GRAVE)
e1:SetCondition(c12467005.condition)
e1:SetTarget(c12467005.target)
e1:SetOperation(c12467005.operation)
c:RegisterEffect(e1)
end
function c12467005.condition(e,tp,eg,ep,ev,re,r,rp)
return not e:GetHandler():IsReason(REASON_RETURN)
end
function c12467005.filter1(c)
return c:IsFaceup() and c:IsCanTurnSet()
end
......
......@@ -6,14 +6,10 @@ function c15341821.initial_effect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOKEN)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e1:SetCode(EVENT_TO_GRAVE)
e1:SetCondition(c15341821.condition)
e1:SetTarget(c15341821.target)
e1:SetOperation(c15341821.operation)
c:RegisterEffect(e1)
end
function c15341821.condition(e,tp,eg,ep,ev,re,r,rp)
return not e:GetHandler():IsReason(REASON_RETURN)
end
function c15341821.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,2,0,0)
......
......@@ -6,13 +6,9 @@ function c17932494.initial_effect(c)
e1:SetCategory(CATEGORY_ATKCHANGE)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e1:SetCode(EVENT_TO_GRAVE)
e1:SetCondition(c17932494.condition)
e1:SetOperation(c17932494.operation)
c:RegisterEffect(e1)
end
function c17932494.condition(e,tp,eg,ep,ev,re,r,rp)
return not e:GetHandler():IsReason(REASON_RETURN)
end
function c17932494.filter(c)
return c:IsFaceup() and c:IsLevelBelow(2)
end
......
......@@ -33,7 +33,6 @@ function c19261966.initial_effect(c)
e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e4:SetCode(EVENT_TO_GRAVE)
e4:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e4:SetCondition(c19261966.thcon)
e4:SetTarget(c19261966.thtg)
e4:SetOperation(c19261966.thop)
c:RegisterEffect(e4)
......@@ -153,9 +152,6 @@ function c19261966.sumlimit(e,c,sump,sumtype,sumpos,targetp,se)
return se:IsActiveType(TYPE_SPELL+TYPE_TRAP) and se:IsHasType(EFFECT_TYPE_ACTIONS)
and c:IsLocation(LOCATION_GRAVE+LOCATION_HAND)
end
function c19261966.thcon(e,tp,eg,ep,ev,re,r,rp)
return not e:GetHandler():IsReason(REASON_RETURN)
end
function c19261966.thfilter(c)
return c:IsSetCard(0x9d) and c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsAbleToHand()
end
......
......@@ -43,8 +43,7 @@ function c20366274.initial_effect(c)
e5:SetCategory(CATEGORY_TOHAND)
e5:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e5:SetCode(EVENT_TO_GRAVE)
e5:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e5:SetCondition(c20366274.thcon)
e5:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY)
e5:SetTarget(c20366274.thtg)
e5:SetOperation(c20366274.thop)
c:RegisterEffect(e5)
......@@ -189,9 +188,6 @@ function c20366274.desop(e,tp,eg,ep,ev,re,r,rp)
Duel.Destroy(bc,REASON_EFFECT)
end
end
function c20366274.thcon(e,tp,eg,ep,ev,re,r,rp)
return not e:GetHandler():IsReason(REASON_RETURN)
end
function c20366274.thfilter(c)
return c:IsSetCard(0x9d) and c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsAbleToHand()
end
......
......@@ -27,7 +27,6 @@ function c20758643.initial_effect(c)
e3:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e3:SetCode(EVENT_TO_GRAVE)
e3:SetCountLimit(1,20758643)
e3:SetCondition(c20758643.spcon)
e3:SetTarget(c20758643.sptg)
e3:SetOperation(c20758643.spop)
c:RegisterEffect(e3)
......@@ -55,9 +54,6 @@ function c20758643.ssop(e,tp,eg,ep,ev,re,r,rp)
Duel.SpecialSummon(e:GetHandler(),0,tp,tp,false,false,POS_FACEUP)
end
end
function c20758643.spcon(e,tp,eg,ep,ev,re,r,rp)
return not e:GetHandler():IsReason(REASON_RETURN)
end
function c20758643.spfilter(c,e,tp)
return c:IsSetCard(0xb1) and not c:IsCode(20758643) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
......
......@@ -4,13 +4,9 @@ function c21593977.initial_effect(c)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_TO_GRAVE)
e1:SetCondition(c21593977.condition)
e1:SetOperation(c21593977.operation)
c:RegisterEffect(e1)
end
function c21593977.condition(e,tp,eg,ep,ev,re,r,rp)
return not e:GetHandler():IsReason(REASON_RETURN)
end
function c21593977.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local e1=Effect.CreateEffect(c)
......
......@@ -22,7 +22,6 @@ function c23649496.initial_effect(c)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_DAMAGE_STEP)
e2:SetCode(EVENT_TO_GRAVE)
e2:SetCondition(c23649496.tgcon)
e2:SetTarget(c23649496.tgtg)
e2:SetOperation(c23649496.tgop)
c:RegisterEffect(e2)
......@@ -74,9 +73,6 @@ end
function c23649496.splimit(e,c,sump,sumtype,sumpos,targetp,se)
return c:IsCode(e:GetLabel())
end
function c23649496.tgcon(e,tp,eg,ep,ev,re,r,rp)
return not e:GetHandler():IsReason(REASON_RETURN)
end
function c23649496.tgfilter(c)
return c:IsSetCard(0x76) and c:IsAbleToGrave()
end
......
......@@ -16,7 +16,7 @@ function c2407147.cfilter(c)
return c:IsSetCard(0x39) and c:GetCode()~=2407147
end
function c2407147.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(c2407147.cfilter,tp,LOCATION_GRAVE,0,1,nil) and not e:GetHandler():IsReason(REASON_RETURN)
return Duel.IsExistingMatchingCard(c2407147.cfilter,tp,LOCATION_GRAVE,0,1,nil)
end
function c2407147.filter(c)
return c:IsSetCard(0x39) and c:IsAbleToGrave()
......
......@@ -31,7 +31,6 @@ function c24701235.initial_effect(c)
e6:SetCategory(CATEGORY_DRAW)
e6:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e6:SetCode(EVENT_TO_GRAVE)
e6:SetCondition(c24701235.condition)
e6:SetTarget(c24701235.target)
e6:SetOperation(c24701235.operation)
c:RegisterEffect(e6)
......@@ -86,9 +85,6 @@ end
function c24701235.cfilter(c)
return c:IsFaceup() and c:IsType(TYPE_SPIRIT)
end
function c24701235.condition(e,tp,eg,ep,ev,re,r,rp)
return not e:GetHandler():IsReason(REASON_RETURN)
end
function c24701235.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c24701235.cfilter,tp,LOCATION_MZONE,0,1,nil) end
Duel.SetTargetPlayer(tp)
......
......@@ -59,22 +59,20 @@ function c2542230.discon(e)
end
function c2542230.regop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsReason(REASON_RETURN) then
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(2542230,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetRange(LOCATION_GRAVE)
e1:SetHintTiming(TIMING_END_PHASE)
e1:SetCountLimit(1)
e1:SetCondition(c2542230.spcon)
e1:SetTarget(c2542230.sptg)
e1:SetOperation(c2542230.spop)
e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END)
c:RegisterEffect(e1)
end
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(2542230,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetRange(LOCATION_GRAVE)
e1:SetHintTiming(TIMING_END_PHASE)
e1:SetCountLimit(1)
e1:SetCondition(c2542230.spcon)
e1:SetTarget(c2542230.sptg)
e1:SetOperation(c2542230.spop)
e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END)
c:RegisterEffect(e1)
end
function c2542230.spcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetCurrentPhase()==PHASE_END
......
......@@ -15,7 +15,7 @@ function c30328508.initial_effect(c)
e2:SetDescription(aux.Stringid(30328508,1))
e2:SetCategory(CATEGORY_TOGRAVE)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCode(EVENT_TO_GRAVE)
e2:SetCountLimit(1,30328508)
e2:SetCondition(c30328508.tgcon)
......@@ -37,7 +37,7 @@ function c30328508.operation(e,tp,eg,ep,ev,re,r,rp)
end
end
function c30328508.tgcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsReason(REASON_EFFECT) and not e:GetHandler():IsReason(REASON_RETURN)
return e:GetHandler():IsReason(REASON_EFFECT)
end
function c30328508.filter(c)
return c:IsSetCard(0x9d) and not c:IsCode(30328508) and c:IsAbleToGrave()
......
......@@ -6,14 +6,10 @@ function c33413638.initial_effect(c)
e1:SetCategory(CATEGORY_TODECK)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e1:SetCode(EVENT_TO_GRAVE)
e1:SetCondition(c33413638.tdcon)
e1:SetTarget(c33413638.tdtg)
e1:SetOperation(c33413638.tdop)
c:RegisterEffect(e1)
end
function c33413638.tdcon(e,tp,eg,ep,ev,re,r,rp)
return not e:GetHandler():IsReason(REASON_RETURN)
end
function c33413638.tdtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_TODECK,e:GetHandler(),1,0,0)
......
......@@ -8,7 +8,6 @@ function c35629124.initial_effect(c)
e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e1:SetCode(EVENT_TO_GRAVE)
e1:SetCountLimit(1,35629124)
e1:SetCondition(c35629124.spcon)
e1:SetCost(c35629124.spcost)
e1:SetTarget(c35629124.sptg)
e1:SetOperation(c35629124.spop)
......@@ -18,9 +17,6 @@ end
function c35629124.counterfilter(c)
return c:IsRace(RACE_DRAGON)
end
function c35629124.spcon(e,tp,eg,ep,ev,re,r,rp)
return not e:GetHandler():IsReason(REASON_RETURN)
end
function c35629124.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetActivityCount(tp,ACTIVITY_BATTLE_PHASE)==0
and Duel.GetCustomActivityCount(35629124,tp,ACTIVITY_SPSUMMON)==0 end
......
......@@ -25,9 +25,8 @@ function c36553319.initial_effect(c)
e3:SetCategory(CATEGORY_REMOVE)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_TO_GRAVE)
e3:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e3:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY)
e3:SetCountLimit(1,36553319)
e3:SetCondition(c36553319.rmcon)
e3:SetTarget(c36553319.rmtg)
e3:SetOperation(c36553319.rmop)
c:RegisterEffect(e3)
......@@ -55,9 +54,6 @@ function c36553319.ssop(e,tp,eg,ep,ev,re,r,rp)
Duel.SpecialSummon(e:GetHandler(),0,tp,tp,false,false,POS_FACEUP)
end
end
function c36553319.rmcon(e,tp,eg,ep,ev,re,r,rp)
return not e:GetHandler():IsReason(REASON_RETURN)
end
function c36553319.rmtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsAbleToRemove() end
if chk==0 then return Duel.IsExistingTarget(Card.IsAbleToRemove,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end
......
......@@ -45,7 +45,7 @@ function c3717252.operation(e,tp,eg,ep,ev,re,r,rp)
end
end
function c3717252.drcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsReason(REASON_EFFECT) and not e:GetHandler():IsReason(REASON_RETURN)
return e:GetHandler():IsReason(REASON_EFFECT)
end
function c3717252.drtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsPlayerCanDraw(tp,1) end
......
......@@ -37,7 +37,6 @@ function c3734202.initial_effect(c)
e4:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e4:SetCode(EVENT_TO_GRAVE)
e4:SetCondition(c3734202.thcon)
e4:SetTarget(c3734202.thtg)
e4:SetOperation(c3734202.thop)
c:RegisterEffect(e4)
......@@ -147,9 +146,6 @@ function c3734202.spop2(e,tp,eg,ep,ev,re,r,rp)
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
end
function c3734202.thcon(e,tp,eg,ep,ev,re,r,rp)
return not e:GetHandler():IsReason(REASON_RETURN)
end
function c3734202.thfilter(c)
return c:IsSetCard(0x2a) and not c:IsCode(3734202) and c:IsAbleToHand()
end
......
......@@ -42,7 +42,7 @@ function c37445295.operation(e,tp,eg,ep,ev,re,r,rp)
end
end
function c37445295.spcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsReason(REASON_EFFECT) and not e:GetHandler():IsReason(REASON_RETURN)
return e:GetHandler():IsReason(REASON_EFFECT)
end
function c37445295.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
......
......@@ -7,14 +7,10 @@ function c41859700.initial_effect(c)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e1:SetCode(EVENT_TO_GRAVE)
e1:SetCondition(c41859700.condition)
e1:SetTarget(c41859700.target)
e1:SetOperation(c41859700.operation)
c:RegisterEffect(e1)
end
function c41859700.condition(e,tp,eg,ep,ev,re,r,rp)
return not e:GetHandler():IsReason(REASON_RETURN)
end
function c41859700.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetTargetPlayer(1-tp)
......
......@@ -25,8 +25,7 @@ function c42110604.initial_effect(c)
e3:SetCategory(CATEGORY_TOHAND)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_TO_GRAVE)
e3:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e3:SetCondition(c42110604.thcon)
e3:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY)
e3:SetTarget(c42110604.thtg)
e3:SetOperation(c42110604.thop)
c:RegisterEffect(e3)
......@@ -45,9 +44,6 @@ function c42110604.operation(e,tp,eg,ep,ev,re,r,rp)
c:RegisterEffect(e1)
end
end
function c42110604.thcon(e,tp,eg,ep,ev,re,r,rp)
return not e:GetHandler():IsReason(REASON_RETURN)
end
function c42110604.thfilter(c)
return c:IsSetCard(0x2016) and c:IsAbleToHand()
end
......
......@@ -34,7 +34,6 @@ function c42199039.initial_effect(c)
e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e4:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e4:SetCode(EVENT_TO_GRAVE)
e4:SetCondition(c42199039.thcon)
e4:SetTarget(c42199039.thtg)
e4:SetOperation(c42199039.thop)
c:RegisterEffect(e4)
......@@ -75,9 +74,6 @@ function c42199039.dtop(e,tp,eg,ep,ev,re,r,rp)
c:RegisterEffect(e1)
end
end
function c42199039.thcon(e,tp,eg,ep,ev,re,r,rp)
return not e:GetHandler():IsReason(REASON_RETURN)
end
function c42199039.thfilter(c)
return c:IsSetCard(0x60) and not c:IsCode(42199039) and c:IsAbleToHand()
end
......
......@@ -20,9 +20,8 @@ function c43698897.initial_effect(c)
e3:SetCategory(CATEGORY_TOHAND)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_TO_GRAVE)
e3:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY)
e3:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY)
e3:SetCountLimit(1,43698898)
e3:SetCondition(c43698897.thcon)
e3:SetTarget(c43698897.thtg)
e3:SetOperation(c43698897.thop)
c:RegisterEffect(e3)
......@@ -104,9 +103,6 @@ function c43698897.spop(e,tp,eg,ep,ev,re,r,rp)
end
end
end
function c43698897.thcon(e,tp,eg,ep,ev,re,r,rp)
return not e:GetHandler():IsReason(REASON_RETURN)
end
function c43698897.thfilter(c)
return c:IsFaceup() and c:IsCode(6077601) and c:IsAbleToHand()
end
......
......@@ -6,14 +6,10 @@ function c45010690.initial_effect(c)
e1:SetCategory(CATEGORY_DRAW+CATEGORY_TODECK)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e1:SetCode(EVENT_TO_GRAVE)
e1:SetCondition(c45010690.condition)
e1:SetTarget(c45010690.target)
e1:SetOperation(c45010690.operation)
c:RegisterEffect(e1)
end
function c45010690.condition(e,tp,eg,ep,ev,re,r,rp)
return not e:GetHandler():IsReason(REASON_RETURN)
end
function c45010690.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetTargetPlayer(tp)
......
......@@ -26,7 +26,6 @@ function c45593826.initial_effect(c)
e3:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e3:SetCode(EVENT_TO_GRAVE)
e3:SetCountLimit(1,45593826)
e3:SetCondition(c45593826.dtcon)
e3:SetTarget(c45593826.dttg)
e3:SetOperation(c45593826.dtop)
c:RegisterEffect(e3)
......@@ -54,9 +53,6 @@ function c45593826.ssop(e,tp,eg,ep,ev,re,r,rp)
Duel.SpecialSummon(e:GetHandler(),0,tp,tp,false,false,POS_FACEUP)
end
end
function c45593826.dtcon(e,tp,eg,ep,ev,re,r,rp)
return not e:GetHandler():IsReason(REASON_RETURN)
end
function c45593826.dttg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsSetCard,tp,LOCATION_DECK,0,1,nil,0xb1) end
end
......
......@@ -31,9 +31,8 @@ function c46895036.initial_effect(c)
e3:SetCategory(CATEGORY_TOHAND)
e3:SetDescription(aux.Stringid(46895036,1))
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e3:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY)
e3:SetCode(EVENT_TO_GRAVE)
e3:SetCondition(c46895036.thcon)
e3:SetTarget(c46895036.thtg)
e3:SetOperation(c46895036.thop)
c:RegisterEffect(e3)
......@@ -68,9 +67,6 @@ function c46895036.operation(e,tp,eg,ep,ev,re,r,rp)
tc:RegisterEffect(e1)
end
end
function c46895036.thcon(e,tp,eg,ep,ev,re,r,rp)
return not e:GetHandler():IsReason(REASON_RETURN)
end
function c46895036.filter(c)
return c:IsSetCard(0x8d) and c:IsAbleToHand()
end
......
......@@ -81,7 +81,7 @@ function c4756629.sumop(e,tp,eg,ep,ev,re,r,rp)
end
function c4756629.decop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsReason(REASON_RETURN) or Duel.GetFlagEffect(tp,4756630)~=0 then return end
if Duel.GetFlagEffect(tp,4756630)~=0 then return end
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_DECREASE_TRIBUTE)
......
......@@ -27,7 +27,6 @@ function c47728740.initial_effect(c)
e3:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY)
e3:SetCode(EVENT_TO_GRAVE)
e3:SetCountLimit(1,47728740)
e3:SetCondition(c47728740.discon)
e3:SetTarget(c47728740.distg)
e3:SetOperation(c47728740.disop)
c:RegisterEffect(e3)
......@@ -55,9 +54,6 @@ function c47728740.ssop(e,tp,eg,ep,ev,re,r,rp)
Duel.SpecialSummon(e:GetHandler(),0,tp,tp,false,false,POS_FACEUP)
end
end
function c47728740.discon(e,tp,eg,ep,ev,re,r,rp)
return not e:GetHandler():IsReason(REASON_RETURN)
end
function c47728740.distg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsFaceup() and chkc:IsLocation(LOCATION_MZONE) end
if chk==0 then return Duel.IsExistingTarget(Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end
......
......@@ -35,8 +35,7 @@ function c48424886.initial_effect(c)
e4:SetCategory(CATEGORY_TOHAND)
e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e4:SetCode(EVENT_TO_GRAVE)
e4:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e4:SetCondition(c48424886.thcon)
e4:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY)
e4:SetTarget(c48424886.thtg)
e4:SetOperation(c48424886.thop)
c:RegisterEffect(e4)
......@@ -173,9 +172,6 @@ function c48424886.operation(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SendtoGrave(g,REASON_EFFECT)
end
end
function c48424886.thcon(e,tp,eg,ep,ev,re,r,rp)
return not e:GetHandler():IsReason(REASON_RETURN)
end
function c48424886.thfilter(c)
return c:IsSetCard(0x9d) and c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsAbleToHand()
end
......
......@@ -17,7 +17,6 @@ function c48497555.initial_effect(c)
e2:SetCode(EVENT_TO_GRAVE)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e2:SetCountLimit(1,48497556)
e2:SetCondition(c48497555.spcon)
e2:SetTarget(c48497555.sptg)
e2:SetOperation(c48497555.spop)
c:RegisterEffect(e2)
......@@ -42,9 +41,6 @@ function c48497555.activate(e,tp,eg,ep,ev,re,r,rp)
Duel.RaiseEvent(c,EVENT_SSET,e,REASON_EFFECT,tp,tp,0)
end
end
function c48497555.spcon(e,tp,eg,ep,ev,re,r,rp)
return not e:GetHandler():IsReason(REASON_RETURN)
end
function c48497555.spfilter(c,e,tp)
return c:IsSetCard(0x43) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
......
......@@ -15,7 +15,7 @@ function c4904633.initial_effect(c)
e2:SetCategory(CATEGORY_TOHAND)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_TO_GRAVE)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY)
e2:SetCondition(c4904633.thcon)
e2:SetTarget(c4904633.thtg)
e2:SetOperation(c4904633.thop)
......@@ -41,7 +41,7 @@ function c4904633.activate(e,tp,eg,ep,ev,re,r,rp)
c:RegisterEffect(e1)
end
function c4904633.thcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsReason(REASON_EFFECT) and not e:GetHandler():IsReason(REASON_RETURN)
return e:GetHandler():IsReason(REASON_EFFECT)
end
function c4904633.thfilter(c)
return c:IsSetCard(0x9d) and c:IsType(TYPE_SPELL+TYPE_TRAP) and not c:IsCode(4904633) and c:IsAbleToHand()
......
......@@ -16,7 +16,7 @@ function c4939890.initial_effect(c)
e2:SetDescription(aux.Stringid(4939890,1))
e2:SetCategory(CATEGORY_TOHAND)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCode(EVENT_TO_GRAVE)
e2:SetCountLimit(1,4939890)
e2:SetCondition(c4939890.thcon)
......@@ -45,7 +45,7 @@ function c4939890.operation(e,tp,eg,ep,ev,re,r,rp)
end
end
function c4939890.thcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsReason(REASON_EFFECT) and not e:GetHandler():IsReason(REASON_RETURN)
return e:GetHandler():IsReason(REASON_EFFECT)
end
function c4939890.thfilter(c)
return c:IsSetCard(0x9d) and c:IsType(TYPE_MONSTER) and not c:IsCode(4939890) and c:IsAbleToHand()
......
......@@ -7,14 +7,10 @@ function c50287060.initial_effect(c)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP)
e1:SetCode(EVENT_TO_GRAVE)
e1:SetCondition(c50287060.eqcon)
e1:SetTarget(c50287060.eqtg)
e1:SetOperation(c50287060.eqop)
c:RegisterEffect(e1)
end
function c50287060.eqcon(e,tp,eg,ep,ev,re,r,rp)
return not e:GetHandler():IsReason(REASON_RETURN)
end
function c50287060.eqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsFaceup() end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0
......
......@@ -15,7 +15,6 @@ function c50720316.initial_effect(c)
local e2=e1:Clone()
e2:SetDescription(aux.Stringid(50720316,1))
e2:SetCode(EVENT_TO_GRAVE)
e2:SetCondition(c50720316.thcon2)
e2:SetTarget(c50720316.thtg2)
e2:SetOperation(c50720316.tgop2)
c:RegisterEffect(e2)
......@@ -39,9 +38,6 @@ function c50720316.tgop1(e,tp,eg,ep,ev,re,r,rp)
Duel.ConfirmCards(1-tp,g)
end
end
function c50720316.thcon2(e,tp,eg,ep,ev,re,r,rp)
return not e:GetHandler():IsReason(REASON_RETURN)
end
function c50720316.thfilter2(c)
return c:IsSetCard(0x8) and c:IsType(TYPE_MONSTER) and not c:IsCode(50720316) and c:IsAbleToHand()
end
......
......@@ -28,9 +28,7 @@ function c5183693.initial_effect(c)
e4:SetDescription(aux.Stringid(5183693,0))
e4:SetCategory(CATEGORY_TODECK)
e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e4:SetProperty(EFFECT_FLAG_DAMAGE_STEP)
e4:SetCode(EVENT_TO_GRAVE)
e4:SetCondition(c5183693.tdcon)
e4:SetTarget(c5183693.tdtg)
e4:SetOperation(c5183693.tdop)
c:RegisterEffect(e4)
......@@ -74,9 +72,6 @@ function c5183693.atkup(e,tp,eg,ep,ev,re,r,rp)
d:RegisterEffect(e1)
end
end
function c5183693.tdcon(e,tp,eg,ep,ev,re,r,rp)
return not e:GetHandler():IsReason(REASON_RETURN)
end
function c5183693.tdtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToDeck() end
Duel.SetOperationInfo(0,CATEGORY_TODECK,e:GetHandler(),1,0,0)
......
......@@ -6,7 +6,6 @@ function c51858306.initial_effect(c)
e1:SetCategory(CATEGORY_REMOVE)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e1:SetCode(EVENT_TO_GRAVE)
e1:SetCondition(c51858306.condition)
e1:SetTarget(c51858306.target)
e1:SetOperation(c51858306.operation)
c:RegisterEffect(e1)
......@@ -23,9 +22,6 @@ function c51858306.initial_effect(c)
e2:SetLabelObject(e1)
c:RegisterEffect(e2)
end
function c51858306.condition(e,tp,eg,ep,ev,re,r,rp)
return not e:GetHandler():IsReason(REASON_RETURN)
end
function c51858306.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,tp,LOCATION_DECK)
......
......@@ -16,7 +16,7 @@ function c52551211.initial_effect(c)
e2:SetCategory(CATEGORY_POSITION)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_TO_GRAVE)
e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY)
e2:SetCountLimit(1,52551211)
e2:SetCondition(c52551211.poscon)
e2:SetTarget(c52551211.postg)
......@@ -41,7 +41,7 @@ function c52551211.thop(e,tp,eg,ep,ev,re,r,rp)
end
end
function c52551211.poscon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsReason(REASON_EFFECT) and not e:GetHandler():IsReason(REASON_RETURN)
return e:GetHandler():IsReason(REASON_EFFECT)
end
function c52551211.postg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) end
......
......@@ -5,17 +5,12 @@ function c52624755.initial_effect(c)
e1:SetDescription(aux.Stringid(52624755,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP)
e1:SetCode(EVENT_TO_GRAVE)
e1:SetCondition(c52624755.condition)
e1:SetCost(c52624755.cost)
e1:SetTarget(c52624755.target)
e1:SetOperation(c52624755.operation)
c:RegisterEffect(e1)
end
function c52624755.condition(e,tp,eg,ep,ev,re,r,rp)
return not e:GetHandler():IsReason(REASON_RETURN)
end
function c52624755.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToRemoveAsCost() end
Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_COST)
......
......@@ -7,14 +7,10 @@ function c52823314.initial_effect(c)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCode(EVENT_TO_GRAVE)
e1:SetCondition(c52823314.condition)
e1:SetTarget(c52823314.target)
e1:SetOperation(c52823314.operation)
c:RegisterEffect(e1)
end
function c52823314.condition(e,tp,eg,ep,ev,re,r,rp)
return not e:GetHandler():IsReason(REASON_RETURN)
end
function c52823314.filter(c)
return c:GetCode()~=52823314 and c:IsType(TYPE_MONSTER) and c:IsAbleToDeck()
end
......
......@@ -15,7 +15,7 @@ function c5361647.initial_effect(c)
e2:SetCategory(CATEGORY_TOHAND)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_TO_GRAVE)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetCondition(c5361647.thcon)
e2:SetTarget(c5361647.thtg)
e2:SetOperation(c5361647.thop)
......@@ -31,7 +31,7 @@ function c5361647.desop(e,tp,eg,ep,ev,re,r,rp)
end
end
function c5361647.thcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsReason(REASON_EFFECT) and not e:GetHandler():IsReason(REASON_RETURN)
return e:GetHandler():IsReason(REASON_EFFECT)
end
function c5361647.filter(c)
return c:IsSetCard(0x84) and c:GetCode()~=5361647 and c:IsType(TYPE_MONSTER) and c:IsAbleToHand()
......
......@@ -6,14 +6,10 @@ function c54359696.initial_effect(c)
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e1:SetCode(EVENT_TO_GRAVE)
e1:SetCondition(c54359696.condition)
e1:SetTarget(c54359696.target)
e1:SetOperation(c54359696.operation)
c:RegisterEffect(e1)
end
function c54359696.condition(e,tp,eg,ep,ev,re,r,rp)
return not e:GetHandler():IsReason(REASON_RETURN)
end
function c54359696.filter(c)
return c:IsSetCard(0x6e) and c:GetLevel()==3 and c:IsAbleToHand()
end
......
......@@ -7,14 +7,10 @@ function c56223084.initial_effect(c)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCode(EVENT_TO_GRAVE)
e1:SetCondition(c56223084.condition)
e1:SetTarget(c56223084.target)
e1:SetOperation(c56223084.operation)
c:RegisterEffect(e1)
end
function c56223084.condition(e,tp,eg,ep,ev,re,r,rp)
return not e:GetHandler():IsReason(REASON_RETURN)
end
function c56223084.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 chk==0 then return true end
......
......@@ -62,9 +62,7 @@ function c56585883.operation(e,tp,eg,ep,ev,re,r,rp)
end
function c56585883.regop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsReason(REASON_RETURN) then
c:RegisterFlagEffect(56585883,RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END,0,1)
end
c:RegisterFlagEffect(56585883,RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END,0,1)
end
function c56585883.thcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetFlagEffect(56585883)>0
......
......@@ -27,7 +27,6 @@ function c57143342.initial_effect(c)
e3:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e3:SetCode(EVENT_TO_GRAVE)
e3:SetCountLimit(1,57143342)
e3:SetCondition(c57143342.spcon)
e3:SetTarget(c57143342.sptg)
e3:SetOperation(c57143342.spop)
c:RegisterEffect(e3)
......@@ -55,9 +54,6 @@ function c57143342.ssop(e,tp,eg,ep,ev,re,r,rp)
Duel.SpecialSummon(e:GetHandler(),0,tp,tp,false,false,POS_FACEUP)
end
end
function c57143342.spcon(e,tp,eg,ep,ev,re,r,rp)
return not e:GetHandler():IsReason(REASON_RETURN)
end
function c57143342.spfilter(c,e,tp)
return c:IsSetCard(0xb1) and not c:IsCode(57143342) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
......
......@@ -14,8 +14,7 @@ function c57473560.initial_effect(c)
e2:SetCategory(CATEGORY_TOGRAVE)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_TO_GRAVE)
e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e2:SetCondition(c57473560.tgcon)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetTarget(c57473560.tgtg)
e2:SetOperation(c57473560.tgop)
c:RegisterEffect(e2)
......@@ -30,9 +29,6 @@ function c57473560.initial_effect(c)
e3:SetOperation(c57473560.spop)
c:RegisterEffect(e3)
end
function c57473560.tgcon(e,tp,eg,ep,ev,re,r,rp)
return not e:GetHandler():IsReason(REASON_RETURN)
end
function c57473560.tgfilter(c,code)
return c:IsCode(code) and c:IsAbleToGrave()
end
......
......@@ -21,7 +21,7 @@ function c58016954.initial_effect(c)
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_TOHAND)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e3:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY)
e3:SetCode(EVENT_SPSUMMON_SUCCESS)
e3:SetCountLimit(1,58016954)
e3:SetCondition(c58016954.condition1)
......@@ -30,7 +30,7 @@ function c58016954.initial_effect(c)
c:RegisterEffect(e3)
local e4=e3:Clone()
e4:SetCode(EVENT_TO_GRAVE)
e4:SetCondition(c58016954.condition2)
e4:SetCondition(aux.TRUE)
c:RegisterEffect(e4)
end
function c58016954.splimit(e,c,sump,sumtype,sumpos,targetp)
......@@ -43,9 +43,6 @@ end
function c58016954.condition1(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetSummonType()==SUMMON_TYPE_PENDULUM
end
function c58016954.condition2(e,tp,eg,ep,ev,re,r,rp)
return not e:GetHandler():IsReason(REASON_RETURN)
end
function c58016954.cfilter(c)
return (c:GetSequence()==6 or c:GetSequence()==7) and c:IsSetCard(0xc4)
end
......
......@@ -16,9 +16,8 @@ function c5929801.initial_effect(c)
e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_TO_GRAVE)
e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCountLimit(1,5929802)
e2:SetCondition(c5929801.thcon)
e2:SetCost(c5929801.cost)
e2:SetTarget(c5929801.thtg)
e2:SetOperation(c5929801.thop)
......@@ -59,9 +58,6 @@ function c5929801.spop(e,tp,eg,ep,ev,re,r,rp)
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
end
end
function c5929801.thcon(e,tp,eg,ep,ev,re,r,rp)
return not e:GetHandler():IsReason(REASON_RETURN)
end
function c5929801.thfilter(c)
return c:IsCode(5929801) and c:IsAbleToHand()
end
......
......@@ -17,7 +17,6 @@ function c60990740.initial_effect(c)
e2:SetCode(EVENT_TO_GRAVE)
e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e2:SetCountLimit(1,60990741)
e2:SetCondition(c60990740.sdcon)
e2:SetTarget(c60990740.sdtg)
e2:SetOperation(c60990740.sdop)
c:RegisterEffect(e2)
......@@ -51,9 +50,6 @@ function c60990740.operation(e,tp,eg,ep,ev,re,r,rp)
Duel.SendtoGrave(tc,REASON_EFFECT+REASON_REVEAL)
end
end
function c60990740.sdcon(e,tp,eg,ep,ev,re,r,rp)
return not e:GetHandler():IsReason(REASON_RETURN)
end
function c60990740.sdtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetFieldGroupCount(tp,0,LOCATION_DECK)>2 end
end
......
......@@ -22,8 +22,7 @@ function c62017867.initial_effect(c)
c:RegisterEffect(e2)
end
function c62017867.condition(e,tp,eg,ep,ev,re,r,rp)
return not e:GetHandler():IsReason(REASON_RETURN)
and not Duel.IsExistingMatchingCard(Card.IsType,tp,LOCATION_GRAVE,0,1,nil,TYPE_SPELL+TYPE_TRAP)
return not Duel.IsExistingMatchingCard(Card.IsType,tp,LOCATION_GRAVE,0,1,nil,TYPE_SPELL+TYPE_TRAP)
end
function c62017867.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)>=5 end
......
......@@ -25,9 +25,8 @@ function c62957424.initial_effect(c)
e3:SetCategory(CATEGORY_SPECIAL_SUMMON)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_TO_GRAVE)
e3:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e3:SetProperty(EFFECT_FLAG_DELAY)
e3:SetCountLimit(1,62957424)
e3:SetCondition(c62957424.spcon)
e3:SetTarget(c62957424.sptg)
e3:SetOperation(c62957424.spop)
c:RegisterEffect(e3)
......@@ -55,9 +54,6 @@ function c62957424.ssop(e,tp,eg,ep,ev,re,r,rp)
Duel.SpecialSummon(e:GetHandler(),0,tp,tp,false,false,POS_FACEUP)
end
end
function c62957424.spcon(e,tp,eg,ep,ev,re,r,rp)
return not e:GetHandler():IsReason(REASON_RETURN)
end
function c62957424.spfilter(c,e,tp)
return c:GetLevel()==3 and c:IsAttribute(ATTRIBUTE_DARK) and c:IsRace(RACE_FIEND) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
......
......@@ -7,14 +7,10 @@ function c64306248.initial_effect(c)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e1:SetCode(EVENT_TO_GRAVE)
e1:SetCondition(c64306248.condition)
e1:SetTarget(c64306248.target)
e1:SetOperation(c64306248.operation)
c:RegisterEffect(e1)
end
function c64306248.condition(e,tp,eg,ep,ev,re,r,rp)
return not e:GetHandler():IsReason(REASON_RETURN)
end
function c64306248.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetTargetPlayer(tp)
......
......@@ -22,8 +22,7 @@ function c65872270.initial_effect(c)
e3:SetCategory(CATEGORY_TOHAND)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_TO_GRAVE)
e3:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e3:SetCondition(c65872270.thcon)
e3:SetProperty(EFFECT_FLAG_DELAY)
e3:SetTarget(c65872270.thtg)
e3:SetOperation(c65872270.thop)
c:RegisterEffect(e3)
......@@ -69,9 +68,6 @@ function c65872270.desop(e,tp,eg,ep,ev,re,r,rp)
Duel.SendtoHand(rg,nil,REASON_EFFECT)
end
end
function c65872270.thcon(e,tp,eg,ep,ev,re,r,rp)
return not e:GetHandler():IsReason(REASON_RETURN)
end
function c65872270.thfilter(c)
return c:IsFaceup() and c:IsSetCard(0xc8) and c:IsAbleToHand()
end
......
......@@ -15,7 +15,7 @@ function c66540884.initial_effect(c)
end
function c66540884.thcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return (c:IsReason(REASON_EFFECT) and not c:IsReason(REASON_RETURN)) or c:IsReason(REASON_BATTLE)
return c:IsReason(REASON_EFFECT) or c:IsReason(REASON_BATTLE)
end
function c66540884.thfilter(c)
return c:IsSetCard(0x45) and c:GetCode()~=66540884 and c:IsAbleToHand()
......
......@@ -5,16 +5,12 @@ function c67696066.initial_effect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_DAMAGE)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_TO_GRAVE)
e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY)
e1:SetCountLimit(1,67696066)
e1:SetCondition(c67696066.spcon)
e1:SetTarget(c67696066.sptg)
e1:SetOperation(c67696066.spop)
c:RegisterEffect(e1)
end
function c67696066.spcon(e,tp,eg,ep,ev,re,r,rp)
return not e:GetHandler():IsReason(REASON_RETURN)
end
function c67696066.filter(c,e,tp)
return c:IsSetCard(0xc6) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
......
......@@ -6,7 +6,6 @@ function c69750546.initial_effect(c)
e1:SetCategory(CATEGORY_DAMAGE)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e1:SetCode(EVENT_TO_GRAVE)
e1:SetCondition(c69750546.condition)
e1:SetTarget(c69750546.target)
e1:SetOperation(c69750546.operation)
c:RegisterEffect(e1)
......@@ -23,9 +22,6 @@ function c69750546.initial_effect(c)
e2:SetOperation(c69750546.desop)
c:RegisterEffect(e2)
end
function c69750546.condition(e,tp,eg,ep,ev,re,r,rp)
return not e:GetHandler():IsReason(REASON_RETURN)
end
function c69750546.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
......@@ -38,7 +34,7 @@ function c69750546.operation(e,tp,eg,ep,ev,re,r,rp)
Duel.Damage(p,d,REASON_EFFECT)
end
function c69750546.descon(e,tp,eg,ep,ev,re,r,rp)
return not e:GetHandler():IsReason(REASON_RETURN) and re and re:GetHandler():IsSetCard(0xb9)
return re and re:GetHandler():IsSetCard(0xb9)
end
function c69750546.costfilter(c)
return c:IsCode(69750546) and c:IsAbleToGraveAsCost()
......
......@@ -21,9 +21,8 @@ function c70245411.initial_effect(c)
e3:SetDescription(aux.Stringid(70245411,1))
e3:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e3:SetProperty(EFFECT_FLAG_DELAY)
e3:SetCode(EVENT_TO_GRAVE)
e3:SetCondition(c70245411.thcon)
e3:SetTarget(c70245411.thtg)
e3:SetOperation(c70245411.thop)
c:RegisterEffect(e3)
......@@ -59,9 +58,6 @@ function c70245411.spop(e,tp,eg,ep,ev,re,r,rp)
end
Duel.ShuffleHand(tp)
end
function c70245411.thcon(e,tp,eg,ep,ev,re,r,rp)
return not e:GetHandler():IsReason(REASON_RETURN)
end
function c70245411.filter(c)
return (c:IsCode(30068120) or (c:IsSetCard(0xa9) and c:IsType(TYPE_MONSTER))) and c:IsAbleToHand()
end
......
......@@ -27,10 +27,9 @@ function c72291078.initial_effect(c)
e4:SetDescription(aux.Stringid(72291078,1))
e4:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOKEN)
e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e4:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e4:SetProperty(EFFECT_FLAG_DELAY)
e4:SetCode(EVENT_TO_GRAVE)
e4:SetCountLimit(1,72291078)
e4:SetCondition(c72291078.spcon)
e4:SetTarget(c72291078.sptg)
e4:SetOperation(c72291078.spop)
c:RegisterEffect(e4)
......@@ -58,9 +57,6 @@ function c72291078.operation(e,tp,eg,ep,ev,re,r,rp)
Duel.Summon(tp,tc,true,nil)
end
end
function c72291078.spcon(e,tp,eg,ep,ev,re,r,rp)
return not e:GetHandler():IsReason(REASON_RETURN)
end
function c72291078.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsPlayerCanSpecialSummonMonster(tp,31533705,0x101b,0x4011,0,0,3,RACE_MACHINE,ATTRIBUTE_WIND) end
......
......@@ -15,9 +15,7 @@ function c73146473.initial_effect(c)
e2:SetDescription(aux.Stringid(73146473,1))
e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP)
e2:SetCode(EVENT_TO_GRAVE)
e2:SetCondition(c73146473.thcon)
e2:SetTarget(c73146473.thtg)
e2:SetOperation(c73146473.thop)
c:RegisterEffect(e2)
......@@ -47,9 +45,6 @@ function c73146473.spop(e,tp,eg,ep,ev,re,r,rp)
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
end
function c73146473.thcon(e,tp,eg,ep,ev,re,r,rp)
return not e:GetHandler():IsReason(REASON_RETURN)
end
function c73146473.sfilter(c)
return c:IsSetCard(0x1f) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand()
end
......
......@@ -24,10 +24,9 @@ function c73213494.initial_effect(c)
e3:SetDescription(aux.Stringid(73213494,1))
e3:SetCategory(CATEGORY_TOHAND)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY)
e3:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY)
e3:SetCode(EVENT_TO_GRAVE)
e3:SetCountLimit(1,73213494)
e3:SetCondition(c73213494.thcon)
e3:SetTarget(c73213494.thtg)
e3:SetOperation(c73213494.thop)
c:RegisterEffect(e3)
......@@ -58,9 +57,6 @@ end
function c73213494.thfilter(c)
return c:IsFacedown() and c:IsAbleToHand()
end
function c73213494.thcon(e,tp,eg,ep,ev,re,r,rp)
return not e:GetHandler():IsReason(REASON_RETURN)
end
function c73213494.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_SZONE) and c73213494.thfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c73213494.thfilter,tp,LOCATION_SZONE,LOCATION_SZONE,1,nil) end
......
......@@ -34,8 +34,7 @@ function c74009824.initial_effect(c)
e4:SetCategory(CATEGORY_TOHAND)
e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e4:SetCode(EVENT_TO_GRAVE)
e4:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e4:SetCondition(c74009824.thcon)
e4:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY)
e4:SetTarget(c74009824.thtg)
e4:SetOperation(c74009824.thop)
c:RegisterEffect(e4)
......@@ -172,9 +171,6 @@ end
function c74009824.indval(e,c)
return bit.band(c:GetSummonType(),SUMMON_TYPE_SPECIAL)==SUMMON_TYPE_SPECIAL
end
function c74009824.thcon(e,tp,eg,ep,ev,re,r,rp)
return not e:GetHandler():IsReason(REASON_RETURN)
end
function c74009824.thfilter(c)
return c:IsSetCard(0x9d) and c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsAbleToHand()
end
......
......@@ -36,8 +36,7 @@ function c74822425.initial_effect(c)
e4:SetCategory(CATEGORY_TOHAND)
e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e4:SetCode(EVENT_TO_GRAVE)
e4:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e4:SetCondition(c74822425.thcon)
e4:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY)
e4:SetTarget(c74822425.thtg)
e4:SetOperation(c74822425.thop)
c:RegisterEffect(e4)
......@@ -181,9 +180,6 @@ function c74822425.disop(e,tp,eg,ep,ev,re,r,rp)
end
end
end
function c74822425.thcon(e,tp,eg,ep,ev,re,r,rp)
return not e:GetHandler():IsReason(REASON_RETURN)
end
function c74822425.thfilter(c)
return c:IsSetCard(0x9d) and c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsAbleToHand()
end
......
......@@ -28,9 +28,8 @@ function c75367227.initial_effect(c)
e3:SetCategory(CATEGORY_TOHAND)
e3:SetDescription(aux.Stringid(75367227,1))
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e3:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY)
e3:SetCode(EVENT_TO_GRAVE)
e3:SetCondition(c75367227.thcon)
e3:SetTarget(c75367227.thtg)
e3:SetOperation(c75367227.thop)
c:RegisterEffect(e3)
......@@ -58,9 +57,6 @@ function c75367227.desop(e,tp,eg,ep,ev,re,r,rp)
Duel.Destroy(tc,REASON_EFFECT)
end
end
function c75367227.thcon(e,tp,eg,ep,ev,re,r,rp)
return not e:GetHandler():IsReason(REASON_RETURN)
end
function c75367227.filter(c)
return c:IsSetCard(0x8d) and c:IsAbleToHand()
end
......
......@@ -7,14 +7,10 @@ function c75673220.initial_effect(c)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e1:SetCode(EVENT_TO_GRAVE)
e1:SetCountLimit(1,75673220)
e1:SetCondition(c75673220.condition)
e1:SetTarget(c75673220.target)
e1:SetOperation(c75673220.operation)
c:RegisterEffect(e1)
end
function c75673220.condition(e,tp,eg,ep,ev,re,r,rp)
return not e:GetHandler():IsReason(REASON_RETURN)
end
function c75673220.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,1-tp,LOCATION_HAND)
......
......@@ -16,7 +16,7 @@ function c77723643.initial_effect(c)
e2:SetDescription(aux.Stringid(77723643,1))
e2:SetCategory(CATEGORY_DESTROY)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY)
e2:SetCode(EVENT_TO_GRAVE)
e2:SetCountLimit(1,77723643)
e2:SetCondition(c77723643.descon)
......@@ -43,7 +43,7 @@ function c77723643.operation(e,tp,eg,ep,ev,re,r,rp)
end
end
function c77723643.descon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsReason(REASON_EFFECT) and not e:GetHandler():IsReason(REASON_RETURN)
return e:GetHandler():IsReason(REASON_EFFECT)
end
function c77723643.filter(c)
return c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsDestructable()
......
......@@ -81,7 +81,7 @@ function c78358521.sumop(e,tp,eg,ep,ev,re,r,rp)
end
function c78358521.decop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsReason(REASON_RETURN) or Duel.GetFlagEffect(tp,78358522)~=0 then return end
if Duel.GetFlagEffect(tp,78358522)~=0 then return end
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_DECREASE_TRIBUTE)
......
......@@ -52,7 +52,7 @@ function c78474168.activate(e,tp,eg,ep,ev,re,r,rp)
end
end
function c78474168.negcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()==tp and e:GetHandler():GetTurnID()~=Duel.GetTurnCount()
return Duel.GetTurnPlayer()==tp and e:GetHandler():GetTurnID()~=Duel.GetTurnCount() and not e:GetHandler():IsReason()
end
function c78474168.negcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToRemoveAsCost() end
......
......@@ -6,14 +6,10 @@ function c79814787.initial_effect(c)
e1:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e1:SetCode(EVENT_TO_GRAVE)
e1:SetCondition(c79814787.condition)
e1:SetTarget(c79814787.target)
e1:SetOperation(c79814787.operation)
c:RegisterEffect(e1)
end
function c79814787.condition(e,tp,eg,ep,ev,re,r,rp)
return not e:GetHandler():IsReason(REASON_RETURN)
end
function c79814787.filter(c)
return c:GetCode()==89631139 and c:IsAbleToHand()
end
......
......@@ -35,8 +35,7 @@ function c80532587.initial_effect(c)
e4:SetCategory(CATEGORY_DESTROY)
e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e4:SetCode(EVENT_TO_GRAVE)
e4:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e4:SetCondition(c80532587.descon)
e4:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY)
e4:SetTarget(c80532587.destg)
e4:SetOperation(c80532587.desop)
c:RegisterEffect(e4)
......@@ -79,9 +78,6 @@ function c80532587.spop(e,tp,eg,ep,ev,re,r,rp)
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
end
function c80532587.descon(e,tp,eg,ep,ev,re,r,rp)
return not e:GetHandler():IsReason(REASON_RETURN)
end
function c80532587.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsOnField() and chkc:IsDestructable() end
if chk==0 then return Duel.IsExistingTarget(Card.IsDestructable,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end
......
......@@ -17,10 +17,9 @@ function c81035362.initial_effect(c)
e3:SetDescription(aux.Stringid(81035362,0))
e3:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e3:SetProperty(EFFECT_FLAG_DELAY)
e3:SetCode(EVENT_TO_GRAVE)
e3:SetCountLimit(1,81035362)
e3:SetCondition(c81035362.tgcon)
e3:SetTarget(c81035362.tgtg)
e3:SetOperation(c81035362.tgop)
c:RegisterEffect(e3)
......@@ -28,9 +27,6 @@ end
function c81035362.indtg(e,c)
return c:IsRace(RACE_FIEND) and not c:IsCode(81035362)
end
function c81035362.tgcon(e,tp,eg,ep,ev,re,r,rp)
return not e:GetHandler():IsReason(REASON_RETURN)
end
function c81035362.tgfilter(c)
return c:IsRace(RACE_FIEND) and not c:IsCode(81035362) and c:IsAbleToGrave()
end
......
......@@ -33,7 +33,7 @@ function c81788994.initial_effect(c)
c:RegisterEffect(e4)
end
function c81788994.cfilter(c)
return c:IsSetCard(0x9d) and c:IsType(TYPE_MONSTER) and c:IsReason(REASON_EFFECT) and not c:IsReason(REASON_RETURN)
return c:IsSetCard(0x9d) and c:IsType(TYPE_MONSTER) and c:IsReason(REASON_EFFECT)
end
function c81788994.ctcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c81788994.cfilter,1,nil)
......
......@@ -24,10 +24,9 @@ function c81992475.initial_effect(c)
e3:SetDescription(aux.Stringid(81992475,1))
e3:SetCategory(CATEGORY_REMOVE+CATEGORY_DAMAGE)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e3:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY)
e3:SetCode(EVENT_TO_GRAVE)
e3:SetCountLimit(1,81992475)
e3:SetCondition(c81992475.rmcon)
e3:SetTarget(c81992475.rmtg)
e3:SetOperation(c81992475.rmop)
c:RegisterEffect(e3)
......@@ -55,9 +54,6 @@ function c81992475.ssop(e,tp,eg,ep,ev,re,r,rp)
Duel.SpecialSummon(e:GetHandler(),0,tp,tp,false,false,POS_FACEUP)
end
end
function c81992475.rmcon(e,tp,eg,ep,ev,re,r,rp)
return not e:GetHandler():IsReason(REASON_RETURN)
end
function c81992475.rmfilter(c)
return c:IsSetCard(0xb1) and not c:IsCode(81992475) and c:IsAbleToRemove()
end
......
......@@ -18,7 +18,6 @@ function c82293134.initial_effect(c)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e2:SetCode(EVENT_TO_GRAVE)
e2:SetCountLimit(1,82293134)
e2:SetCondition(c82293134.thcon)
e2:SetTarget(c82293134.thtg)
e2:SetOperation(c82293134.thop)
c:RegisterEffect(e2)
......@@ -37,9 +36,6 @@ function c82293134.desop(e,tp,eg,ep,ev,re,r,rp)
Duel.Destroy(c,REASON_EFFECT)
end
end
function c82293134.thcon(e,tp,eg,ep,ev,re,r,rp)
return not e:GetHandler():IsReason(REASON_RETURN)
end
function c82293134.filter(c)
return c:IsSetCard(0x76) and c:GetCode()~=82293134 and c:IsType(TYPE_MONSTER) and c:IsAbleToHand()
end
......
......@@ -27,9 +27,8 @@ function c83531441.initial_effect(c)
e3:SetDescription(aux.Stringid(83531441,1))
e3:SetCategory(CATEGORY_TOHAND)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e3:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY)
e3:SetCode(EVENT_TO_GRAVE)
e3:SetCondition(c83531441.thcon)
e3:SetTarget(c83531441.thtg)
e3:SetOperation(c83531441.thop)
c:RegisterEffect(e3)
......@@ -71,9 +70,6 @@ function c83531441.posop(e,tp,eg,ep,ev,re,r,rp)
Duel.ChangePosition(c,POS_FACEUP_DEFENCE)
end
end
function c83531441.thcon(e,tp,eg,ep,ev,re,r,rp)
return not e:GetHandler():IsReason(REASON_RETURN)
end
function c83531441.filter(c)
return c:IsSetCard(0xb1) and c:IsAbleToHand()
end
......
......@@ -51,19 +51,17 @@ function c84764038.ssop(e,tp,eg,ep,ev,re,r,rp)
end
function c84764038.regop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsReason(REASON_RETURN) then
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(84764038,1))
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_PHASE+PHASE_END)
e1:SetCountLimit(1,84764038)
e1:SetRange(LOCATION_GRAVE)
e1:SetTarget(c84764038.thtg)
e1:SetOperation(c84764038.thop)
e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END)
c:RegisterEffect(e1)
end
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(84764038,1))
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_PHASE+PHASE_END)
e1:SetCountLimit(1,84764038)
e1:SetRange(LOCATION_GRAVE)
e1:SetTarget(c84764038.thtg)
e1:SetOperation(c84764038.thop)
e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END)
c:RegisterEffect(e1)
end
function c84764038.thfilter(c)
return c:GetLevel()==3 and c:IsAttribute(ATTRIBUTE_DARK) and c:IsRace(RACE_FIEND)
......
......@@ -6,13 +6,9 @@ function c89609515.initial_effect(c)
e1:SetCategory(CATEGORY_ATKCHANGE)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e1:SetCode(EVENT_TO_GRAVE)
e1:SetCondition(c89609515.condition)
e1:SetOperation(c89609515.operation)
c:RegisterEffect(e1)
end
function c89609515.condition(e,tp,eg,ep,ev,re,r,rp)
return not e:GetHandler():IsReason(REASON_RETURN)
end
function c89609515.filter(c)
return c:IsFaceup() and c:IsSetCard(0x39)
end
......
......@@ -6,14 +6,10 @@ function c92450185.initial_effect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e1:SetCode(EVENT_TO_GRAVE)
e1:SetCondition(c92450185.thcon)
e1:SetTarget(c92450185.thtg)
e1:SetOperation(c92450185.thop)
c:RegisterEffect(e1)
end
function c92450185.thcon(e,tp,eg,ep,ev,re,r,rp)
return not e:GetHandler():IsReason(REASON_RETURN)
end
function c92450185.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK+LOCATION_HAND+LOCATION_GRAVE)
......
......@@ -25,9 +25,8 @@ function c9342162.initial_effect(c)
e3:SetCategory(CATEGORY_TOGRAVE)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_TO_GRAVE)
e3:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e3:SetProperty(EFFECT_FLAG_DELAY)
e3:SetCountLimit(1,9342162)
e3:SetCondition(c9342162.tgcon)
e3:SetTarget(c9342162.tgtg)
e3:SetOperation(c9342162.tgop)
c:RegisterEffect(e3)
......@@ -55,9 +54,6 @@ function c9342162.ssop(e,tp,eg,ep,ev,re,r,rp)
Duel.SpecialSummon(e:GetHandler(),0,tp,tp,false,false,POS_FACEUP)
end
end
function c9342162.tgcon(e,tp,eg,ep,ev,re,r,rp)
return not e:GetHandler():IsReason(REASON_RETURN)
end
function c9342162.tgfilter(c)
return c:IsSetCard(0xb1) and c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsAbleToGrave()
end
......
......@@ -5,9 +5,8 @@ function c9418534.initial_effect(c)
e1:SetDescription(aux.Stringid(9418534,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_CARD_TARGET)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCode(EVENT_TO_GRAVE)
e1:SetCondition(c9418534.condition)
e1:SetTarget(c9418534.target)
e1:SetOperation(c9418534.operation)
c:RegisterEffect(e1)
......@@ -17,9 +16,6 @@ function c9418534.initial_effect(c)
e2:SetCode(EFFECT_DIRECT_ATTACK)
c:RegisterEffect(e2)
end
function c9418534.condition(e,tp,eg,ep,ev,re,r,rp)
return not e:GetHandler():IsReason(REASON_RETURN)
end
function c9418534.filter(c,e,tp)
return c:IsCode(77585513) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
......
......@@ -41,8 +41,7 @@ function c94977269.initial_effect(c)
e5:SetCategory(CATEGORY_TOHAND)
e5:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e5:SetCode(EVENT_TO_GRAVE)
e5:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e5:SetCondition(c94977269.thcon)
e5:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY)
e5:SetTarget(c94977269.thtg)
e5:SetOperation(c94977269.thop)
c:RegisterEffect(e5)
......@@ -161,9 +160,6 @@ end
function c94977269.indval(e,re,tp)
return tp~=e:GetHandlerPlayer()
end
function c94977269.thcon(e,tp,eg,ep,ev,re,r,rp)
return not e:GetHandler():IsReason(REASON_RETURN)
end
function c94977269.thfilter(c)
return c:IsSetCard(0x9d) and c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsAbleToHand()
end
......
......@@ -30,7 +30,7 @@ function c95401059.initial_effect(c)
c:RegisterEffect(e3)
local e4=e3:Clone()
e4:SetCode(EVENT_TO_GRAVE)
e4:SetCondition(c95401059.condition2)
e4:SetCondition(aux.TRUE)
c:RegisterEffect(e4)
end
function c95401059.splimit(e,c,sump,sumtype,sumpos,targetp)
......@@ -43,9 +43,6 @@ end
function c95401059.condition1(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetSummonType()==SUMMON_TYPE_PENDULUM
end
function c95401059.condition2(e,tp,eg,ep,ev,re,r,rp)
return not e:GetHandler():IsReason(REASON_RETURN)
end
function c95401059.filter(c,e,tp)
return (c:GetSequence()==6 or c:GetSequence()==7)
and c:IsSetCard(0xc4) and not c:IsCode(95401059) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
......
......@@ -9,7 +9,7 @@ function c95816395.initial_effect(c)
end
function c95816395.regop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if rp~=tp and c:IsReason(REASON_EFFECT) and not c:IsReason(REASON_RETURN) then
if rp~=tp and c:IsReason(REASON_EFFECT) then
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(95816395,0))
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
......
......@@ -57,7 +57,7 @@ function c96345188.lvop(e,tp,eg,ep,ev,re,r,rp)
end
end
function c96345188.thcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetTurnID()==Duel.GetTurnCount() and not e:GetHandler():IsReason(REASON_RETURN)
return e:GetHandler():GetTurnID()==Duel.GetTurnCount()
end
function c96345188.thcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToRemoveAsCost() end
......
......@@ -5,17 +5,13 @@ function c96682430.initial_effect(c)
e1:SetDescription(aux.Stringid(96682430,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCode(EVENT_TO_GRAVE)
e1:SetCountLimit(1,96682430)
e1:SetCondition(c96682430.condition)
e1:SetTarget(c96682430.target)
e1:SetOperation(c96682430.operation)
c:RegisterEffect(e1)
end
function c96682430.condition(e,tp,eg,ep,ev,re,r,rp)
return not e:GetHandler():IsReason(REASON_RETURN)
end
function c96682430.filter(c,e,tp)
return c:IsSetCard(0x74) and c:GetCode()~=96682430 and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
......
......@@ -31,7 +31,6 @@ function c98495314.initial_effect(c)
e5:SetCategory(CATEGORY_TODECK)
e5:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e5:SetCode(EVENT_TO_GRAVE)
e5:SetCondition(c98495314.tdcon)
e5:SetTarget(c98495314.tdtg)
e5:SetOperation(c98495314.tdop)
c:RegisterEffect(e5)
......@@ -49,9 +48,6 @@ function c98495314.operation(e,tp,eg,ep,ev,re,r,rp)
Duel.Equip(tp,e:GetHandler(),tc)
end
end
function c98495314.tdcon(e,tp,eg,ep,ev,re,r,rp)
return not e:GetHandler():IsReason(REASON_RETURN)
end
function c98495314.tdtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsRelateToEffect(e) end
Duel.SetOperationInfo(0,CATEGORY_TODECK,e:GetHandler(),1,0,0)
......
......@@ -275,7 +275,7 @@ EFFECT_DISABLE =2 --效果无效(技能抽取)
EFFECT_CANNOT_DISABLE =3 --效果不能无效
EFFECT_SET_CONTROL =4 --改变控制器
EFFECT_CANNOT_CHANGE_CONTROL =5 --不能改变控制权
EFFECT_CANNOT_ACTIVATE =6 --不能发动卡
EFFECT_CANNOT_ACTIVATE =6 --玩家不能发动效果
EFFECT_CANNOT_TRIGGER =7 --不能发动效果
EFFECT_DISABLE_EFFECT =8 --效果无效 (聖杯)
EFFECT_DISABLE_CHAIN =9 --不能连锁
......
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