Commit b777dfa5 authored by mercury233's avatar mercury233

fix

parent ac0d50f6
...@@ -37,9 +37,9 @@ function c100259041.drcost(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -37,9 +37,9 @@ function c100259041.drcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckLPCost(tp,1000) end if chk==0 then return Duel.CheckLPCost(tp,1000) end
Duel.PayLPCost(tp,1000) Duel.PayLPCost(tp,1000)
end end
function c100259041.cfilter(c,e,tp) function c100259041.cfilter(c,e,tp,mc)
return c:IsRace(RACE_CYBERSE) and c:IsType(TYPE_LINK) and c:IsLinkBelow(3) and not c:IsCode(100259041) return c:IsRace(RACE_CYBERSE) and c:IsType(TYPE_LINK) and c:IsLinkBelow(3) and not c:IsCode(100259041)
and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and Duel.GetLocationCountFromEx(tp,tp,mc,c)>0
end end
function c100259041.drtg(e,tp,eg,ep,ev,re,r,rp,chk) function c100259041.drtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsPlayerCanDraw(tp,1) end if chk==0 then return Duel.IsPlayerCanDraw(tp,1) end
...@@ -52,8 +52,7 @@ function c100259041.drop(e,tp,eg,ep,ev,re,r,rp) ...@@ -52,8 +52,7 @@ function c100259041.drop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
if Duel.Draw(p,d,REASON_EFFECT)~=0 and Duel.GetLP(tp)<=2000 and c:IsRelateToEffect(e) and c:IsAbleToRemove() if Duel.Draw(p,d,REASON_EFFECT)~=0 and Duel.GetLP(tp)<=2000 and c:IsRelateToEffect(e) and c:IsAbleToRemove()
and Duel.GetLocationCountFromEx(tp,tp,c)>0 and Duel.IsExistingMatchingCard(c100259041.cfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp,c)
and Duel.IsExistingMatchingCard(c100259041.cfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp)
and Duel.SelectYesNo(tp,aux.Stringid(100259041,1)) then and Duel.SelectYesNo(tp,aux.Stringid(100259041,1)) then
Duel.BreakEffect() Duel.BreakEffect()
if Duel.Remove(c,POS_FACEUP,REASON_EFFECT)~=0 and c:IsLocation(LOCATION_REMOVED) then if Duel.Remove(c,POS_FACEUP,REASON_EFFECT)~=0 and c:IsLocation(LOCATION_REMOVED) then
......
--鋼鉄の魔導騎士-ギルティギア・フリード --鋼鉄の魔導騎士-ギルティギア・フリード
--Scripted by mallu11 --Scripted by mallu11
function c100260001.initial_effect(c) function c100260001.initial_effect(c)
......
...@@ -10,7 +10,6 @@ function c100260002.initial_effect(c) ...@@ -10,7 +10,6 @@ function c100260002.initial_effect(c)
e1:SetCode(EVENT_SUMMON_SUCCESS) e1:SetCode(EVENT_SUMMON_SUCCESS)
e1:SetProperty(EFFECT_FLAG_DELAY) e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCountLimit(1,100260002) e1:SetCountLimit(1,100260002)
e1:SetTarget(c100260002.regtg)
e1:SetOperation(c100260002.regop) e1:SetOperation(c100260002.regop)
c:RegisterEffect(e1) c:RegisterEffect(e1)
local e2=e1:Clone() local e2=e1:Clone()
...@@ -28,15 +27,6 @@ function c100260002.initial_effect(c) ...@@ -28,15 +27,6 @@ function c100260002.initial_effect(c)
e3:SetOperation(c100260002.spop) e3:SetOperation(c100260002.spop)
c:RegisterEffect(e3) c:RegisterEffect(e3)
end end
function c100260002.thfilter1(c)
return c:IsLevelAbove(5) and c:IsAttribute(ATTRIBUTE_WATER)
end
function c100260002.thfilter2(c)
return c:IsLevelAbove(5) and c:IsAttribute(ATTRIBUTE_WATER) and c:IsAbleToHand()
end
function c100260002.regtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c100260002.thfilter1,tp,LOCATION_DECK,0,1,nil) end
end
function c100260002.regop(e,tp,eg,ep,ev,re,r,rp) function c100260002.regop(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+EFFECT_TYPE_CONTINUOUS) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
...@@ -47,13 +37,16 @@ function c100260002.regop(e,tp,eg,ep,ev,re,r,rp) ...@@ -47,13 +37,16 @@ function c100260002.regop(e,tp,eg,ep,ev,re,r,rp)
e1:SetReset(RESET_PHASE+PHASE_END) e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp) Duel.RegisterEffect(e1,tp)
end end
function c100260002.thfilter(c)
return c:IsLevelAbove(5) and c:IsAttribute(ATTRIBUTE_WATER) and c:IsAbleToHand()
end
function c100260002.thcon(e,tp,eg,ep,ev,re,r,rp) function c100260002.thcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(c100260002.thfilter2,tp,LOCATION_DECK,0,1,nil) return Duel.IsExistingMatchingCard(c100260002.thfilter,tp,LOCATION_DECK,0,1,nil)
end end
function c100260002.thop(e,tp,eg,ep,ev,re,r,rp) function c100260002.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_CARD,0,100260002) Duel.Hint(HINT_CARD,0,100260002)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c100260002.thfilter2,tp,LOCATION_DECK,0,1,1,nil) local g=Duel.SelectMatchingCard(tp,c100260002.thfilter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g) Duel.ConfirmCards(1-tp,g)
......
...@@ -10,7 +10,9 @@ function c100260003.initial_effect(c) ...@@ -10,7 +10,9 @@ function c100260003.initial_effect(c)
e1:SetDescription(aux.Stringid(100260003,0)) e1:SetDescription(aux.Stringid(100260003,0))
e1:SetCategory(CATEGORY_ATKCHANGE) e1:SetCategory(CATEGORY_ATKCHANGE)
e1:SetType(EFFECT_TYPE_QUICK_O) e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP)
e1:SetCode(EVENT_FREE_CHAIN) e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(TIMING_DAMAGE_STEP)
e1:SetRange(LOCATION_MZONE) e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1,100260003) e1:SetCountLimit(1,100260003)
e1:SetCondition(c100260003.atkcon) e1:SetCondition(c100260003.atkcon)
...@@ -40,7 +42,8 @@ function c100260003.initial_effect(c) ...@@ -40,7 +42,8 @@ function c100260003.initial_effect(c)
c:RegisterEffect(e3) c:RegisterEffect(e3)
end end
function c100260003.atkcon(e,tp,eg,ep,ev,re,r,rp) function c100260003.atkcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetCurrentPhase()>=PHASE_BATTLE_START and Duel.GetCurrentPhase()<=PHASE_BATTLE and (Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated()) local ph=Duel.GetCurrentPhase()
return ph>=PHASE_BATTLE_START and ph<=PHASE_BATTLE and (ph~=PHASE_DAMAGE or not Duel.IsDamageCalculated())
end end
function c100260003.atkcost(e,tp,eg,ep,ev,re,r,rp,chk) function c100260003.atkcost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler() local c=e:GetHandler()
......
...@@ -9,6 +9,7 @@ function c100260014.initial_effect(c) ...@@ -9,6 +9,7 @@ function c100260014.initial_effect(c)
e1:SetCode(EVENT_FREE_CHAIN) e1:SetCode(EVENT_FREE_CHAIN)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCountLimit(1,100260014+EFFECT_COUNT_CODE_OATH) e1:SetCountLimit(1,100260014+EFFECT_COUNT_CODE_OATH)
e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e1:SetCost(c100260014.cost) e1:SetCost(c100260014.cost)
e1:SetTarget(c100260014.target) e1:SetTarget(c100260014.target)
e1:SetOperation(c100260014.activate) e1:SetOperation(c100260014.activate)
...@@ -16,6 +17,7 @@ function c100260014.initial_effect(c) ...@@ -16,6 +17,7 @@ function c100260014.initial_effect(c)
end end
function c100260014.costfilter(c,tp) function c100260014.costfilter(c,tp)
return (c:IsControler(tp) or c:IsFaceup()) and c:IsAttackAbove(2000) and not c:IsCode(93717133) and Duel.GetMZoneCount(tp,c)>0 return (c:IsControler(tp) or c:IsFaceup()) and c:IsAttackAbove(2000) and not c:IsCode(93717133) and Duel.GetMZoneCount(tp,c)>0
and Duel.IsExistingTarget(c100260014.rfilter,tp,0,LOCATION_MZONE,1,c)
end end
function c100260014.cost(e,tp,eg,ep,ev,re,r,rp,chk) function c100260014.cost(e,tp,eg,ep,ev,re,r,rp,chk)
e:SetLabel(1) e:SetLabel(1)
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
function c100260018.initial_effect(c) function c100260018.initial_effect(c)
--Activate --Activate
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON) e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_SEARCH)
e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCode(EVENT_FREE_CHAIN) e1:SetCode(EVENT_FREE_CHAIN)
......
...@@ -33,7 +33,7 @@ function c100262001.lvfilter(c) ...@@ -33,7 +33,7 @@ function c100262001.lvfilter(c)
end end
function c100262001.lvtg(e,tp,eg,ep,ev,re,r,rp,chk) function c100262001.lvtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c100262001.lvfilter,tp,LOCATION_DECK+LOCATION_EXTRA,0,1,nil) if chk==0 then return Duel.IsExistingMatchingCard(c100262001.lvfilter,tp,LOCATION_DECK+LOCATION_EXTRA,0,1,nil)
and e:GetHandler():IsLevelAbove(1) end and e:GetHandler():IsLevelAbove(1) and e:GetHandler():IsRelateToEffect(e) end
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_DECK+LOCATION_EXTRA) Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_DECK+LOCATION_EXTRA)
end end
function c100262001.lvop(e,tp,eg,ep,ev,re,r,rp) function c100262001.lvop(e,tp,eg,ep,ev,re,r,rp)
......
...@@ -29,12 +29,12 @@ function c101012022.initial_effect(c) ...@@ -29,12 +29,12 @@ function c101012022.initial_effect(c)
end end
function c101012022.tgfilter(c) function c101012022.tgfilter(c)
return c:IsFaceup() and c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsType(TYPE_CONTINUOUS) and c:IsAbleToGrave() return c:IsFaceup() and c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsType(TYPE_CONTINUOUS) and c:IsAbleToGrave()
and Duel.IsExistingMatchingCard(Card.IsFaceup,0,LOCATION_MZONE,LOCATION_MZONE,2,c)
end end
function c101012022.atktg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c101012022.atktg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local c=e:GetHandler() local c=e:GetHandler()
if chkc then return chkc:IsOnField() and chkc:IsControler(tp) and c101012022.tgfilter(chkc) end if chkc then return chkc:IsOnField() and chkc:IsControler(tp) and c101012022.tgfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c101012022.tgfilter,tp,LOCATION_ONFIELD,0,1,nil) end if chk==0 then return Duel.IsExistingTarget(c101012022.tgfilter,tp,LOCATION_ONFIELD,0,1,nil)
and Duel.IsExistingMatchingCard(Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,2,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectTarget(tp,c101012022.tgfilter,tp,LOCATION_ONFIELD,0,1,1,nil) local g=Duel.SelectTarget(tp,c101012022.tgfilter,tp,LOCATION_ONFIELD,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,g,1,0,0) Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,g,1,0,0)
...@@ -45,6 +45,7 @@ function c101012022.atkop(e,tp,eg,ep,ev,re,r,rp) ...@@ -45,6 +45,7 @@ function c101012022.atkop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
local g=Duel.SelectMatchingCard(tp,Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,2,2,nil) local g=Duel.SelectMatchingCard(tp,Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,2,2,nil)
if g:GetCount()==2 then if g:GetCount()==2 then
Duel.HintSelection(g)
local tc1=g:GetFirst() local tc1=g:GetFirst()
local tc2=g:GetNext() local tc2=g:GetNext()
local e1=Effect.CreateEffect(e:GetHandler()) local e1=Effect.CreateEffect(e:GetHandler())
......
...@@ -46,7 +46,7 @@ function c101012042.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) ...@@ -46,7 +46,7 @@ function c101012042.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectTarget(tp,Card.IsAbleToHand,tp,0,LOCATION_REMOVED,1,1,nil) local g=Duel.SelectTarget(tp,Card.IsAbleToHand,tp,0,LOCATION_REMOVED,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0) Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,0,tp,LOCATION_DECK)
end end
function c101012042.thop(e,tp,eg,ep,ev,re,r,rp) function c101012042.thop(e,tp,eg,ep,ev,re,r,rp)
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
......
...@@ -42,7 +42,7 @@ function c101012046.atktg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) ...@@ -42,7 +42,7 @@ function c101012046.atktg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if mg:GetCount()<1 then return false end if mg:GetCount()<1 then return false end
if chkc then return mg:IsContains(chkc) and c101012046.atkfilter(chkc,e) end if chkc then return mg:IsContains(chkc) and c101012046.atkfilter(chkc,e) end
if chk==0 then return mg:IsExists(c101012046.atkfilter,1,nil,e) end if chk==0 then return mg:IsExists(c101012046.atkfilter,1,nil,e) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SELECT) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
local g=mg:FilterSelect(tp,c101012046.atkfilter,1,1,nil,e) local g=mg:FilterSelect(tp,c101012046.atkfilter,1,1,nil,e)
Duel.SetTargetCard(g) Duel.SetTargetCard(g)
Duel.SetChainLimit(c101012046.chainlm) Duel.SetChainLimit(c101012046.chainlm)
......
...@@ -77,7 +77,8 @@ function c101012069.tfcon(e,tp,eg,ep,ev,re,r,rp) ...@@ -77,7 +77,8 @@ function c101012069.tfcon(e,tp,eg,ep,ev,re,r,rp)
return bit.band(att,att-1)~=0 return bit.band(att,att-1)~=0
end end
function c101012069.tffilter(c,tp) function c101012069.tffilter(c,tp)
return c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsType(TYPE_CONTINUOUS) and c:IsSetCard(0x137) and not c:IsCode(101012069) and not c:IsForbidden() and c:CheckUniqueOnField(tp) return c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsType(TYPE_CONTINUOUS) and c:IsSetCard(0x137) and not c:IsCode(101012069)
and not c:IsForbidden() and c:CheckUniqueOnField(tp)
end end
function c101012069.tftg(e,tp,eg,ep,ev,re,r,rp,chk) function c101012069.tftg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0 if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0
......
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