Commit 8f535139 authored by mercury233's avatar mercury233

update new cards

parent b02f8ad6
#created by ... #created by ...
#main #main
100424037
100266018
100200182 100200182
100266004 100266004
100266020 100266020
......
--ハイレート・ドロー
--
--Script by JoyJ
function c100266018.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(100266018,0))
e1:SetCategory(CATEGORY_DESTROY+CATEGORY_DRAW)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetTarget(c100266018.target)
e1:SetOperation(c100266018.activate)
c:RegisterEffect(e1)
--salvage
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(100266018,1))
e2:SetCategory(CATEGORY_DESTROY)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetRange(LOCATION_GRAVE)
e2:SetCountLimit(1,100266018)
e2:SetTarget(c100266018.settg)
e2:SetOperation(c100266018.setop)
c:RegisterEffect(e2)
end
function c100266018.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsPlayerCanDraw(tp)
and Duel.IsExistingMatchingCard(aux.TRUE,tp,LOCATION_MZONE,0,2,nil) end
Duel.SetOperationInfo(0,CATEGORY_DESTROY,nil,0,tp,LOCATION_MZONE)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,0)
end
function c100266018.activate(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectMatchingCard(tp,aux.TRUE,tp,LOCATION_MZONE,0,2,99,nil)
if #g==0 then return end
local num=Duel.Destroy(g,REASON_EFFECT)
num=math.floor(num/2)
if num<1 then return end
Duel.Draw(tp,num,REASON_EFFECT)
end
function c100266018.settg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) end
if chk==0 then return Duel.IsExistingTarget(aux.TRUE,tp,LOCATION_MZONE,0,1,nil)
and e:GetHandler():IsSSetable() end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectTarget(tp,aux.TRUE,tp,LOCATION_MZONE,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,e:GetHandler(),1,0,0)
end
function c100266018.setop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and Duel.Destroy(tc,REASON_EFFECT)>0
and c:IsRelateToEffect(e) and Duel.SSet(tp,c)>0 then
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
...@@ -66,10 +66,12 @@ end ...@@ -66,10 +66,12 @@ end
function c100424007.atktg(e,tp,eg,ep,ev,re,r,rp,chk) function c100424007.atktg(e,tp,eg,ep,ev,re,r,rp,chk)
local label,atk=e:GetLabel() local label,atk=e:GetLabel()
if chk==0 then if chk==0 then
e:SetLabel(0,atk) e:SetLabel(0,0)
if label~=100 then return false end if label~=100 then return false end
return Duel.IsExistingMatchingCard(c100424007.atkfilter,tp,LOCATION_MZONE,0,1,nil) return Duel.IsExistingMatchingCard(c100424007.atkfilter,tp,LOCATION_MZONE,0,1,nil)
end end
e:SetLabel(0,0)
Duel.SetTargetParam(atk)
end end
function c100424007.atkop(e,tp,eg,ep,ev,re,r,rp) function c100424007.atkop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_OPERATECARD) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_OPERATECARD)
...@@ -77,7 +79,7 @@ function c100424007.atkop(e,tp,eg,ep,ev,re,r,rp) ...@@ -77,7 +79,7 @@ function c100424007.atkop(e,tp,eg,ep,ev,re,r,rp)
local tc=g:GetFirst() local tc=g:GetFirst()
if tc then if tc then
Duel.HintSelection(g) Duel.HintSelection(g)
local label,atk=e:GetLabel() local atk=Duel.GetChainInfo(0,CHAININFO_TARGET_PARAM)
local e1=Effect.CreateEffect(e:GetHandler()) local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE+EFFECT_FLAG_CANNOT_DISABLE) e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE+EFFECT_FLAG_CANNOT_DISABLE)
...@@ -111,6 +113,7 @@ function c100424007.rectg(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -111,6 +113,7 @@ function c100424007.rectg(e,tp,eg,ep,ev,re,r,rp,chk)
if label~=100 then return false end if label~=100 then return false end
return true return true
end end
e:SetLabel(0,0)
Duel.SetTargetPlayer(tp) Duel.SetTargetPlayer(tp)
Duel.SetTargetParam(rec) Duel.SetTargetParam(rec)
Duel.SetOperationInfo(0,CATEGORY_RECOVER,nil,0,tp,rec) Duel.SetOperationInfo(0,CATEGORY_RECOVER,nil,0,tp,rec)
......
--不朽の特殊合金
--
--Script by JoyJ
function c100424037.initial_effect(c)
--activate
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(100424037,0))
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCost(c100424037.condition1)
e1:SetCost(c100424037.target1)
e1:SetOperation(c100424037.activate1)
c:RegisterEffect(e1)
--Activate2
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(100424037,1))
e2:SetCategory(CATEGORY_DISABLE)
e2:SetType(EFFECT_TYPE_ACTIVATE)
e2:SetCode(EVENT_CHAINING)
e2:SetCondition(c100424037.condition2)
e2:SetTarget(c100424037.target2)
e2:SetOperation(c100424037.activate2)
c:RegisterEffect(e2)
end
function c100424037.cfilter(c)
return c:IsCode(77585513) and c:IsFaceup()
end
function c100424037.condition1(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(c100424037.cfilter,tp,LOCATION_ONFIELD,0,1,nil)
end
function c100424037.filter1(c)
return c:IsRace(RACE_MACHINE) and c:IsFaceup()
end
function c100424037.target1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c100424037.filter1,tp,LOCATION_MZONE,0,1,nil) end
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
end
function c100424037.activate1(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(c100424037.filter1,tp,LOCATION_MZONE,0,nil)
local tc=g:GetFirst()
while tc do
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_INDESTRUCTABLE_EFFECT)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
e1:SetValue(aux.indoval)
tc:RegisterEffect(e1)
tc=g:GetNext()
end
end
function c100424037.filter2(c,tp)
return c:IsFaceup() and c:IsControler(tp) and c:IsLocation(LOCATION_MZONE) and c:IsRace(RACE_MACHINE)
end
function c100424037.condition2(e,tp,eg,ep,ev,re,r,rp)
if not c100424037.condition1(e,tp,eg,ep,ev,re,r,rp) then return false end
if not re:IsHasProperty(EFFECT_FLAG_CARD_TARGET) then return false end
local tg=Duel.GetChainInfo(ev,CHAININFO_TARGET_CARDS)
return tg and Duel.IsChainDisablable(ev) and tg:IsExists(c100424037.filter2,1,nil,tp)
end
function c100424037.target2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
Duel.SetOperationInfo(0,CATEGORY_DISABLE,eg,1,0,0)
end
function c100424037.activate2(e,tp,eg,ep,ev,re,r,rp)
Duel.NegateEffect(ev)
end
...@@ -61,18 +61,15 @@ function c48333324.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -61,18 +61,15 @@ function c48333324.activate(e,tp,eg,ep,ev,re,r,rp)
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_DISABLE) e1:SetCode(EFFECT_DISABLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD) e1:SetReset(RESET_EVENT+RESETS_STANDARD)
nc:RegisterEffect(e1) nc:RegisterEffect(e1)
local e2=Effect.CreateEffect(c) local e2=e1:Clone()
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_DISABLE_EFFECT) e2:SetCode(EFFECT_DISABLE_EFFECT)
e2:SetReset(RESET_EVENT+RESETS_STANDARD)
nc:RegisterEffect(e2) nc:RegisterEffect(e2)
if nc:IsType(TYPE_TRAPMONSTER) then if nc:IsType(TYPE_TRAPMONSTER) then
local e3=Effect.CreateEffect(c) local e3=e1:Clone()
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_DISABLE_TRAPMONSTER) e3:SetCode(EFFECT_DISABLE_TRAPMONSTER)
e3:SetReset(RESET_EVENT+RESETS_STANDARD)
nc:RegisterEffect(e3) nc:RegisterEffect(e3)
end end
nc=ng:GetNext() nc=ng:GetNext()
......
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