Commit f4c35118 authored by mercury233's avatar mercury233

update scripts

parent 3b8b49ce
#created by ...
#main
100409037
100409005
100231007
100231008
100231010
......@@ -17,8 +19,8 @@
100409035
100409038
100409001
100228004
#extra
100200149
100231009
100242201
100409012
......@@ -27,22 +29,4 @@
100334041
100334042
100334043
100228001
100228002
100228003
100200148
100200147
100203028
!side
101004000
101004081
101004082
101004084
101004085
101004086
101004083
101004087
101004088
101004089
101004090
101004091
--魔界の警邏課デスポリス
--Police Patrol of the Underworld
--Script by nekrozar
function c100200149.initial_effect(c)
--link summon
c:EnableReviveLimit()
aux.AddLinkProcedure(c,nil,2,2)
--counter
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetCondition(c100200149.regcon)
e1:SetOperation(c100200149.regop)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_MATERIAL_CHECK)
e2:SetValue(c100200149.valcheck)
e2:SetLabelObject(e1)
c:RegisterEffect(e2)
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(100200149,0))
e3:SetCategory(CATEGORY_COUNTER)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetProperty(EFFECT_FLAG_CARD_TARGET)
e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1,100200149)
e3:SetCondition(c100200149.ctcon)
e3:SetCost(c100200149.ctcost)
e3:SetTarget(c100200149.cttg)
e3:SetOperation(c100200149.ctop)
c:RegisterEffect(e3)
end
function c100200149.regcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_LINK) and e:GetLabel()==1
end
function c100200149.regop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
c:RegisterFlagEffect(100200149,RESET_EVENT+RESETS_STANDARD,0,0)
c:RegisterFlagEffect(0,RESET_EVENT+RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(100200149,1))
end
function c100200149.valcheck(e,c)
local g=c:GetMaterial()
if g:GetClassCount(Card.GetCode)==g:GetCount() and g:IsExists(Card.IsLinkAttribute(),2,nil,ATTRIBUTE_DARK) then
e:GetLabelObject():SetLabel(1)
else
e:GetLabelObject():SetLabel(0)
end
end
function c100200149.ctcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetFlagEffect(100200149)~=0
end
function c100200149.cfilter(c)
return Duel.IsExistingTarget(Card.IsCanAddCounter,0,LOCATION_ONFIELD,LOCATION_ONFIELD,1,c,0x1049,1)
end
function c100200149.ctcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckReleaseGroup(tp,c100200149.cfilter,1,nil) end
local g=Duel.SelectReleaseGroup(tp,c100200149.cfilter,1,1,nil)
Duel.Release(g,REASON_COST)
end
function c100200149.cttg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_ONFIELD) and chkc:IsCanAddCounter(0x1049,1) end
if chk==0 then return true end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
Duel.SelectTarget(tp,Card.IsCanAddCounter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil,0x1049,1)
end
function c100200149.ctop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsFaceup() and tc:IsRelateToEffect(e) then
tc:AddCounter(0x1049,1)
if tc:GetFlagEffect(100200149)~=0 then return end
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EFFECT_DESTROY_REPLACE)
e1:SetTarget(c100200149.reptg)
e1:SetOperation(c100200149.repop)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1)
tc:RegisterFlagEffect(100200149,RESET_EVENT+RESETS_STANDARD,0,0)
end
end
function c100200149.reptg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return c:IsReason(REASON_BATTLE+REASON_EFFECT) not c:IsReason(REASON_REPLACE)
and c:IsCanRemoveCounter(tp,0x1049,1,REASON_EFFECT) end
return true
end
function c100200149.repop(e,tp,eg,ep,ev,re,r,rp,chk)
e:GetHandler():RemoveCounter(tp,0x1049,1,REASON_EFFECT)
end
......@@ -16,7 +16,12 @@ function c100231010.filter(c)
return c:IsFaceup() and c:IsType(TYPE_LINK)
end
function c100231010.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c100231010.filter,tp,LOCATION_MZONE,0,1,nil) end
local ct=Duel.GetMatchingGroup(c100231010.filter,tp,LOCATION_MZONE,LOCATION_MZONE,nil):GetClassCount(Card.GetAttribute)
if chk==0 then return (ct==1 and Duel.IsExistingMatchingCard(c100231010.filter,tp,LOCATION_MZONE,0,1,nil))
or (ct==2 and Duel.IsExistingMatchingCard(c100231010.filter,tp,0,LOCATION_MZONE,1,nil))
or ct==3 or ct==4
or (ct==5 and Duel.IsExistingMatchingCard(c100231010.spfilter,tp,LOCATION_DECK,0,1,nil))
or (ct==6 and Duel.IsExistingMatchingCard(c100231010.desfilter,tp,0,LOCATION_MZONE,1,nil)) end
end
function c100231010.spfilter(c,e,tp)
return c:IsAttackAbove(2500) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
......
......@@ -62,7 +62,7 @@ function c100409002.negop(e,tp,eg,ep,ev,re,r,rp)
end
end
function c100409002.spcon(e,tp,eg,ep,ev,re,r,rp)
return rp~=tp
return rp==1-tp
end
function c100409002.spfilter(c,e,tp)
return c:IsCode(89631139) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
......
--強靭!無敵!最強!
--The Toughest! The Invincible! The Unbeatable!
--Script by dest
function c100409005.initial_effect(c)
--effect gain
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetTarget(c100409005.target)
e1:SetOperation(c100409005.activate)
c:RegisterEffect(e1)
--set
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(100409005,0))
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCode(EVENT_SUMMON_SUCCESS)
e2:SetRange(LOCATION_GRAVE)
e2:SetCountLimit(1,100409005)
e2:SetCondition(c100409005.setcon)
e2:SetTarget(c100409005.settg)
e2:SetOperation(c100409005.setop)
c:RegisterEffect(e2)
local e3=e2:Clone()
e3:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e3)
end
c100409005.card_code_list={89631139}
function c100409005.filter(c)
return c:IsFaceup() and c:IsSetCard(0xdd)
end
function c100409005.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c100409005.filter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c100409005.filter,tp,LOCATION_MZONE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
local g=Duel.SelectTarget(tp,c100409005.filter,tp,LOCATION_MZONE,0,1,1,nil)
end
function c100409005.activate(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if tc:IsFaceup() and tc:IsRelateToEffect(e) then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_IMMUNE_EFFECT)
e1:SetValue(c100409005.efilter)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_INDESTRUCTABLE_BATTLE)
e2:SetValue(1)
e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e2)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e3:SetCode(EVENT_DAMAGE_STEP_END)
e3:SetCondition(c100409005.descon)
e3:SetOperation(c100409005.desop)
e3:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e3)
end
end
function c100409005.efilter(e,re)
return e:GetHandler()~=re:GetOwner()
end
function c100409005.descon(e,tp,eg,ep,ev,re,r,rp)
local tc=e:GetHandler():GetBattleTarget()
return tc and tc:IsRelateToBattle()
end
function c100409005.desop(e,tp,eg,ep,ev,re,r,rp)
local tc=e:GetHandler():GetBattleTarget()
Duel.Hint(HINT_CARD,0,100409005)
Duel.Destroy(tc,REASON_EFFECT)
end
function c100409005.cfilter(c,tp)
return c:IsCode(89631139) and c:GetSummonPlayer()==tp
end
function c100409005.setcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c100409005.cfilter,1,nil,tp)
end
function c100409005.settg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsSSetable() end
Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,e:GetHandler(),1,0,0)
end
function c100409005.setop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) and c:IsSSetable() then
Duel.SSet(tp,c)
Duel.ConfirmCards(1-tp,c)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_LEAVE_FIELD_REDIRECT)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_REDIRECT)
e1:SetValue(LOCATION_REMOVED)
c:RegisterEffect(e1)
end
end
--フォトン・ハンド
--Photon Hand
--Script by dest
function c100409037.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_CONTROL)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,100409037+EFFECT_COUNT_CODE_OATH)
e1:SetCondition(c100409037.condition)
e1:SetCost(c100409037.cost)
e1:SetTarget(c100409037.target)
e1:SetOperation(c100409037.activate)
c:RegisterEffect(e1)
end
function c100409037.cfilter(c)
return c:IsFaceup() and (c:IsSetCard(0x55) or c:IsSetCard(0x7b))
end
function c100409037.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(c100409037.cfilter,tp,LOCATION_MZONE,0,1,nil)
end
function c100409037.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckLPCost(tp,1000) end
Duel.PayLPCost(tp,1000)
end
function c100409037.geffilter(c)
return c:IsFaceup() and c:IsCode(93717133)
end
function c100409037.filter(c,tp)
return (Duel.IsExistingMatchingCard(c100409037.geffilter,tp,LOCATION_ONFIELD,0,1,nil)
or (c:IsFaceup() and c:IsType(TYPE_XYZ))) and c:IsControlerCanBeChanged()
end
function c100409037.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 c100409037.filter(chkc,tp) end
if chk==0 then return Duel.IsExistingTarget(c100409037.filter,tp,0,LOCATION_MZONE,1,nil,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONTROL)
local g=Duel.SelectTarget(tp,c100409037.filter,tp,0,LOCATION_MZONE,1,1,nil,tp)
Duel.SetOperationInfo(0,CATEGORY_CONTROL,g,1,0,0)
end
function c100409037.activate(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.GetControl(tc,tp)
end
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