Commit 66f06c0e authored by mercury233's avatar mercury233

update scripts

parent 7aa5bb09
......@@ -41,7 +41,7 @@ end
function c100235011.efftg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE+LOCATION_REMOVED) and chkc:IsControler(tp) and c100235011.efffilter(chkc,e,tp,eg,ep,ev,re,r,rp) end
if chk==0 then return Duel.IsExistingTarget(c100235011.efffilter,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,nil,e,tp,eg,ep,ev,re,r,rp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
local g=Duel.SelectTarget(tp,c100235011.efffilter,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,1,nil,e,tp,eg,ep,ev,re,r,rp)
Duel.SetOperationInfo(0,CATEGORY_TODECK,g,1,0,0)
local tc=g:GetFirst()
......
......@@ -13,7 +13,7 @@ function c100235026.initial_effect(c)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1,100235026)
e1:SetHintTiming(0,TIMING_END_PHASE)
e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e1:SetCost(c100235026.ctcost)
e1:SetTarget(c100235026.cttg)
e1:SetOperation(c100235026.ctop)
......
......@@ -60,7 +60,7 @@ function c100235031.spcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c100235031.cfilter,1,nil,lg)
end
function c100235031.spfilter(c,e,tp)
return c:IsRace(RACE_DRAGON+RACE_WINDBEAST) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
return c:IsRace(RACE_DRAGON+RACE_WINDBEAST) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE)
end
function c100235031.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
......
......@@ -17,10 +17,10 @@ function c100235056.initial_effect(c)
--tohand
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(100235056,1))
e2:SetCategory(CATEGORY_TOHAND)
e2:SetCategory(CATEGORY_TOHAND+CATEGORY_DECKDES)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetCountLimit(1)
e2:SetCountLimit(1,100235056)
e2:SetRange(LOCATION_MZONE)
e2:SetTarget(c100235056.thtg)
e2:SetOperation(c100235056.thop)
......@@ -28,17 +28,19 @@ function c100235056.initial_effect(c)
end
function c100235056.thfilter(c)
return c:IsSetCard(0x7c) and c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsAbleToHand()
and (c:IsFaceup() or c:IsLocation(LOCATION_GRAVE))
end
function c100235056.tgfilter(c)
return c:IsSetCard(0x79) and c:IsType(TYPE_MONSTER) and c:IsAbleToGrave()
end
function c100235056.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsOnField() and chkc:IsControler(1-tp) and c100235056.thfilter(chkc) end
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_ONFIELD+LOCATION_GRAVE) and c100235056.thfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c100235056.thfilter,tp,LOCATION_ONFIELD+LOCATION_GRAVE,0,1,nil)
and Duel.IsExistingMatchingCard(c100235056.tgfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND)
local g=Duel.SelectTarget(tp,c100235056.thfilter,tp,LOCATION_ONFIELD+LOCATION_GRAVE,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_DECK)
end
function c100235056.thop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
......
......@@ -74,6 +74,7 @@ function c100235061.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
end
function c100235061.spop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c100235061.spfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
......@@ -91,7 +92,7 @@ function c100235061.settg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c100235061.setfilter,tp,LOCATION_DECK,0,1,nil) end
end
function c100235061.setop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOFIELD)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET)
local g=Duel.SelectMatchingCard(tp,c100235061.setfilter,tp,LOCATION_DECK,0,1,1,nil)
local tc=g:GetFirst()
if tc then
......
......@@ -29,17 +29,18 @@ function c100235091.initial_effect(c)
e2:SetOperation(c100235091.thop)
c:RegisterEffect(e2)
--recover
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(100235091,2))
e1:SetCategory(CATEGORY_RECOVER)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
e1:SetCode(EVENT_PHASE+PHASE_END)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1)
e1:SetCondition(c100235091.reccon)
e1:SetTarget(c100235091.rectg)
e1:SetOperation(c100235091.recop)
c:RegisterEffect(e1)
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(100235091,2))
e3:SetCategory(CATEGORY_RECOVER)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
e3:SetCode(EVENT_PHASE+PHASE_END)
e3:SetRange(LOCATION_MZONE)
e3:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e3:SetCountLimit(1)
e3:SetCondition(c100235091.reccon)
e3:SetTarget(c100235091.rectg)
e3:SetOperation(c100235091.recop)
c:RegisterEffect(e3)
end
function c100235091.rmfilter(c)
return c:IsType(TYPE_MONSTER) and c:IsAbleToRemoveAsCost()
......
......@@ -7,7 +7,6 @@ function c100235096.initial_effect(c)
aux.AddLinkProcedure(c,c100235096.matfilter,1,1)
--effect
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(100235096,0))
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
......@@ -52,9 +51,11 @@ function c100235096.efftg(e,tp,eg,ep,ev,re,r,rp,chk)
else op=Duel.SelectOption(tp,aux.Stringid(100235096,1))+1 end
e:SetLabel(op)
if op==0 then
Duel.Hint(HINT_OPSELECTED,1-tp,aux.Stringid(100235096,0))
e:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
else
Duel.Hint(HINT_OPSELECTED,1-tp,aux.Stringid(100235096,1))
e:SetCategory(CATEGORY_SPECIAL_SUMMON)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
end
......
......@@ -87,7 +87,7 @@ function c100236008.spop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.SelectMatchingCard(tp,c100236008.spfilter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp)
local tc=g:GetFirst()
local c=e:GetHandler()
if tc and Duel.SpecialSummon(tc,0,tp,tp,true,false,POS_FACEUP)~=0 then
if tc and Duel.SpecialSummonStep(tc,0,tp,tp,true,false,POS_FACEUP) then
--atklimit
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
......@@ -95,7 +95,7 @@ function c100236008.spop(e,tp,eg,ep,ev,re,r,rp)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_IGNORE_IMMUNE)
e1:SetValue(c100236008.bttg)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1,true)
tc:RegisterEffect(e1)
Duel.SpecialSummonComplete()
end
end
......
......@@ -23,10 +23,10 @@ function c100237003.filter(c)
return c:IsFaceup() and c:IsType(TYPE_NORMAL) and c:IsAbleToDeck()
end
function c100237003.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_REMOVE) and chkc:IsControler(tp) and c100237003.filter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c100237003.filter,tp,LOCATION_REMOVE,0,1,nil) end
if chkc then return chkc:IsLocation(LOCATION_REMOVED) and chkc:IsControler(tp) and c100237003.filter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c100237003.filter,tp,LOCATION_REMOVED,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=Duel.SelectTarget(tp,c100237003.filter,tp,LOCATION_REMOVE,0,1,3,nil)
local g=Duel.SelectTarget(tp,c100237003.filter,tp,LOCATION_REMOVED,0,1,3,nil)
Duel.SetOperationInfo(0,CATEGORY_TODECK,g,g:GetCount(),0,0)
end
function c100237003.activate(e,tp,eg,ep,ev,re,r,rp)
......
......@@ -38,8 +38,8 @@ function c100335001.reccost(e,tp,eg,ep,ev,re,r,rp,chk)
end
function c100335001.rectg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return false end
if chk==0 then return Duel.GetAttacker():IsOnField()
and Duel.GetAttackTarget():IsOnField() end
if chk==0 then return Duel.GetAttacker():IsOnField() and Duel.GetAttacker():IsCanBeEffectTarget(e)
and Duel.GetAttackTarget():IsOnField() and Duel.GetAttackTarget():IsCanBeEffectTarget(e) end
local g=Group.FromCards(Duel.GetAttacker(),Duel.GetAttackTarget())
Duel.SetTargetCard(g)
e:SetLabelObject(Duel.GetAttacker())
......
......@@ -26,34 +26,13 @@ function c100335002.initial_effect(c)
e2:SetTarget(c100335002.drtg)
e2:SetOperation(c100335002.drop)
c:RegisterEffect(e2)
if not c100335002.global_check then
c100335002.global_check=true
c100335002[0]=0
c100335002[1]=0
local ge1=Effect.CreateEffect(c)
ge1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
ge1:SetCode(EVENT_SPSUMMON_SUCCESS)
ge1:SetOperation(c100335002.checkop)
Duel.RegisterEffect(ge1,0)
local ge2=Effect.CreateEffect(c)
ge2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
ge2:SetCode(EVENT_PHASE_START+PHASE_DRAW)
ge2:SetOperation(c100335002.clear)
Duel.RegisterEffect(ge2,0)
end
end
function c100335002.checkop(e,tp,eg,ep,ev,re,r,rp)
local tc=eg:GetFirst()
if tc:IsType(TYPE_LINK) and tc:IsSummonType(SUMMON_TYPE_LINK) then
c100335002[ep]=1
end
Duel.AddCustomActivityCounter(100335002,ACTIVITY_SPSUMMON,c100335002.lkfilter)
end
function c100335002.clear(e,tp,eg,ep,ev,re,r,rp)
c100335002[0]=0
c100335002[1]=0
function c100335002.lkfilter(c)
return not (c:IsType(TYPE_LINK) and c:IsSummonType(SUMMON_TYPE_LINK))
end
function c100335002.spcon(e,tp,eg,ep,ev,re,r,rp)
return c100335002[tp]>0
return Duel.GetCustomActivityCount(id,tp,ACTIVITY_SPSUMMON)>0
end
function c100335002.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
......
......@@ -19,14 +19,15 @@ function c100335005.initial_effect(c)
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e2)
--actlimit
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(100335005,1))
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_MZONE)
e2:SetCost(c100335005.actcost)
e2:SetTarget(c100335005.acttg)
e2:SetOperation(c100335005.actop)
c:RegisterEffect(e2)
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(100335005,1))
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetRange(LOCATION_MZONE)
e3:SetProperty(EFFECT_FLAG_CARD_TARGET)
e3:SetCost(c100335005.actcost)
e3:SetTarget(c100335005.acttg)
e3:SetOperation(c100335005.actop)
c:RegisterEffect(e3)
end
function c100335005.spfilter(c,tp)
return c:IsFaceup() and c:IsControler(tp) and c:IsSetCard(0x119) and not c:IsCode(100335005)
......
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