Commit e3dc74b4 authored by VanillaSalt's avatar VanillaSalt

Merge pull request #815 from sidschingis/patch

fix & hint timings
parents e9093f7d d982fd11
...@@ -6,7 +6,7 @@ function c12444060.initial_effect(c) ...@@ -6,7 +6,7 @@ function c12444060.initial_effect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON) e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN) e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(0,TIMING_END_PHASE) e1:SetHintTiming(0,0x11e8)
e1:SetCost(c12444060.cost) e1:SetCost(c12444060.cost)
e1:SetTarget(c12444060.target) e1:SetTarget(c12444060.target)
e1:SetOperation(c12444060.activate) e1:SetOperation(c12444060.activate)
......
...@@ -6,6 +6,7 @@ function c24508238.initial_effect(c) ...@@ -6,6 +6,7 @@ function c24508238.initial_effect(c)
e1:SetCategory(CATEGORY_REMOVE) e1:SetCategory(CATEGORY_REMOVE)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetType(EFFECT_TYPE_QUICK_O) e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetHintTiming(0,0x11e0)
e1:SetCode(EVENT_FREE_CHAIN) e1:SetCode(EVENT_FREE_CHAIN)
e1:SetRange(LOCATION_HAND) e1:SetRange(LOCATION_HAND)
e1:SetCost(c24508238.cost) e1:SetCost(c24508238.cost)
......
...@@ -40,7 +40,7 @@ function c24658418.spcon(e,tp,eg,ep,ev,re,r,rp) ...@@ -40,7 +40,7 @@ function c24658418.spcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetSummonType()==SUMMON_TYPE_SPECIAL+1 return e:GetHandler():GetSummonType()==SUMMON_TYPE_SPECIAL+1
end end
function c24658418.mfilter(c) function c24658418.mfilter(c)
return c:IsSetCard(0x7b) and not c:IsType(TYPE_TOKEN) return c:IsSetCard(0x7b) and not c:IsType(TYPE_TOKEN) and c:IsFaceup()
end end
function c24658418.xyzfilter(c,mg) function c24658418.xyzfilter(c,mg)
return c:IsSetCard(0x7b) and c:IsXyzSummonable(mg) return c:IsSetCard(0x7b) and c:IsXyzSummonable(mg)
......
...@@ -25,6 +25,7 @@ function c41356845.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -25,6 +25,7 @@ function c41356845.activate(e,tp,eg,ep,ev,re,r,rp)
if tc:IsRelateToEffect(e) and tc:IsFacedown() then if tc:IsRelateToEffect(e) and tc:IsFacedown() then
Duel.ChangePosition(tc,0,POS_FACEUP_ATTACK,0,POS_FACEUP_DEFENCE) Duel.ChangePosition(tc,0,POS_FACEUP_ATTACK,0,POS_FACEUP_DEFENCE)
if tc:IsDefenceBelow(2000) then if tc:IsDefenceBelow(2000) then
Duel.BreakEffect()
Duel.Destroy(tc,REASON_EFFECT) Duel.Destroy(tc,REASON_EFFECT)
else else
Duel.ConfirmCards(1-tc:GetControler(),tc) Duel.ConfirmCards(1-tc:GetControler(),tc)
......
...@@ -66,10 +66,10 @@ function c4239451.adcon2(e,tp,eg,ep,ev,re,r,rp) ...@@ -66,10 +66,10 @@ function c4239451.adcon2(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()==tp and Duel.GetCurrentPhase()==PHASE_BATTLE and Duel.GetCurrentChain()==0 return Duel.GetTurnPlayer()==tp and Duel.GetCurrentPhase()==PHASE_BATTLE and Duel.GetCurrentChain()==0
end end
function c4239451.adtg2(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c4239451.adtg2(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c4239451.filter(chkc) end if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) end
if chk==0 then return Duel.IsExistingTarget(c4239451.filter,tp,LOCATION_MZONE,0,1,nil) end if chk==0 then return Duel.IsExistingTarget(nil,tp,LOCATION_MZONE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
Duel.SelectTarget(tp,c4239451.filter,tp,LOCATION_MZONE,0,1,1,nil) Duel.SelectTarget(tp,nil,tp,LOCATION_MZONE,0,1,1,nil)
end end
function c4239451.adop2(e,tp,eg,ep,ev,re,r,rp) function c4239451.adop2(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
......
...@@ -21,11 +21,11 @@ end ...@@ -21,11 +21,11 @@ end
function c56350972.regcon1(e,tp,eg,ep,ev,re,r,rp) function c56350972.regcon1(e,tp,eg,ep,ev,re,r,rp)
return bit.band(e:GetHandler():GetSummonType(),SUMMON_TYPE_RITUAL)==SUMMON_TYPE_RITUAL return bit.band(e:GetHandler():GetSummonType(),SUMMON_TYPE_RITUAL)==SUMMON_TYPE_RITUAL
end end
function c56350972.regfilter(c) function c56350972.regfilter(c,tp)
return c:IsAttribute(ATTRIBUTE_LIGHT) and c:IsPreviousLocation(LOCATION_HAND+LOCATION_DECK) return c:IsAttribute(ATTRIBUTE_LIGHT) and c:IsPreviousLocation(LOCATION_HAND+LOCATION_DECK) and c:GetPreviousControler()==tp
end end
function c56350972.regcon2(e,tp,eg,ep,ev,re,r,rp) function c56350972.regcon2(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c56350972.regfilter,1,nil) return eg:IsExists(c56350972.regfilter,1,nil,tp)
end end
function c56350972.regop(e,tp,eg,ep,ev,re,r,rp) function c56350972.regop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
......
...@@ -4,7 +4,7 @@ function c77505534.initial_effect(c) ...@@ -4,7 +4,7 @@ function c77505534.initial_effect(c)
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN) e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(0,0x1e0+TIMING_END_PHASE) e1:SetHintTiming(0,0x11e8)
e1:SetTarget(c77505534.target) e1:SetTarget(c77505534.target)
e1:SetOperation(c77505534.activate) e1:SetOperation(c77505534.activate)
c:RegisterEffect(e1) c:RegisterEffect(e1)
......
...@@ -25,7 +25,7 @@ function c78474168.initial_effect(c) ...@@ -25,7 +25,7 @@ function c78474168.initial_effect(c)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
function c78474168.filter(c) function c78474168.filter(c)
return c:IsFaceup() and c:IsType(TYPE_EFFECT) return c:IsFaceup() and c:IsType(TYPE_EFFECT) and not c:IsDisabled()
end end
function c78474168.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c78474168.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and c78474168.filter(chkc) end if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and c78474168.filter(chkc) end
......
...@@ -11,8 +11,12 @@ function c88033975.initial_effect(c) ...@@ -11,8 +11,12 @@ function c88033975.initial_effect(c)
c:RegisterEffect(e1) c:RegisterEffect(e1)
local e2=e1:Clone() local e2=e1:Clone()
e2:SetCode(EVENT_BE_BATTLE_TARGET) e2:SetCode(EVENT_BE_BATTLE_TARGET)
e2:SetCondition(c88033975.con)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
function c88033975.con(e,tp)
return e:GetHandler():IsFaceup()
end
function c88033975.operation(e,tp,eg,ep,ev,re,r,rp) function c88033975.operation(e,tp,eg,ep,ev,re,r,rp)
local e1=Effect.CreateEffect(e:GetHandler()) local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD) e1:SetType(EFFECT_TYPE_FIELD)
......
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