Commit 76a31c77 authored by mercury233's avatar mercury233

update scripts

parent 717f4a74
--E・HERO リキッドマン
--
--Script by mercury233
function c100423013.initial_effect(c)
--special summon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(100423013,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_SUMMON_SUCCESS)
e1:SetCountLimit(1,100423013)
e1:SetTarget(c100423013.target)
e1:SetOperation(c100423013.operation)
c:RegisterEffect(e1)
--draw
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(100423013,1))
e2:SetCategory(CATEGORY_DRAW+CATEGORY_HANDES)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_PLAYER_TARGET)
e2:SetCode(EVENT_BE_MATERIAL)
e2:SetCountLimit(1,100423013)
e2:SetCondition(c100423013.drcon)
e2:SetTarget(c100423013.drtg)
e2:SetOperation(c100423013.drop)
c:RegisterEffect(e2)
end
function c100423013.spfilter(c,e,tp)
return c:IsLevelBelow(4) and c:IsSetCard(0x8) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c100423013.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and c100423013.spfilter(chkc,e,tp) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingTarget(c100423013.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,c100423013.spfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0)
end
function c100423013.operation(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)
end
end
function c100423013.drcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsLocation(LOCATION_GRAVE+LOCATION_REMOVED) and r==REASON_FUSION and c:GetReasonCard():IsSetCard(0x8)
end
function c100423013.drtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsPlayerCanDraw(tp,2) end
Duel.SetTargetPlayer(tp)
Duel.SetTargetParam(2)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,2)
Duel.SetOperationInfo(0,CATEGORY_HANDES,nil,0,tp,1)
end
function c100423013.drop(e,tp,eg,ep,ev,re,r,rp)
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
if Duel.Draw(p,d,REASON_EFFECT)==2 then
Duel.ShuffleHand(p)
Duel.BreakEffect()
Duel.DiscardHand(p,nil,1,1,REASON_EFFECT+REASON_DISCARD)
end
end
--ジャンク・コンバーター
--
--Script by mercury233
function c100423024.initial_effect(c)
--search
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(100423024,0))
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,100423024)
e1:SetCost(c100423024.thcost)
e1:SetTarget(c100423024.thtg)
e1:SetOperation(c100423024.thop)
c:RegisterEffect(e1)
--spsummon
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(100423024,0))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_BE_MATERIAL)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY)
e2:SetCountLimit(1,100423024+100)
e2:SetCondition(c100423024.spcon)
e2:SetTarget(c100423024.sptg)
e2:SetOperation(c100423024.spop)
c:RegisterEffect(e2)
end
function c100423024.dfilter(c)
return c:IsType(TYPE_TUNER) and c:IsDiscardable() and c:IsAbleToGraveAsCost()
end
function c100423024.thcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsDiscardable() and e:GetHandler():IsAbleToGraveAsCost()
and Duel.IsExistingMatchingCard(c100423024.dfilter,tp,LOCATION_HAND,0,1,e:GetHandler()) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DISCARD)
local g=Duel.SelectMatchingCard(tp,c100423024.dfilter,tp,LOCATION_HAND,0,1,1,e:GetHandler())
g:AddCard(e:GetHandler())
Duel.SendtoGrave(g,REASON_COST+REASON_DISCARD)
end
function c100423024.thfilter(c)
return c:IsSetCard(0x1017) and c:IsAbleToHand()
end
function c100423024.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c100423024.thfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c100423024.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c100423024.thfilter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
function c100423024.spcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsLocation(LOCATION_GRAVE) and r==REASON_SYNCHRO
end
function c100423024.spfilter(c,e,tp)
return c:IsType(TYPE_TUNER) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE)
end
function c100423024.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and c100423024.spfilter(chkc,e,tp) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingTarget(c100423024.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,c100423024.spfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0)
end
function c100423024.spop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP_DEFENSE) then
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CANNOT_TRIGGER)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e1)
end
Duel.SpecialSummonComplete()
end
--オノマト選択
--
--Script by mercury233
function c100423037.initial_effect(c)
--activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,100423037+EFFECT_COUNT_CODE_OATH)
e1:SetOperation(c100423037.activate)
c:RegisterEffect(e1)
--level
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(100423037,0))
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetCountLimit(1,100423037+100)
e2:SetRange(LOCATION_SZONE)
e2:SetTarget(c100423037.target)
e2:SetOperation(c100423037.operation)
c:RegisterEffect(e2)
end
function c100423037.filter(c)
return c:IsAbleToHand() and (c:IsSetCard(0x239) or c:IsCode(8512558)) and not c:IsCode(100423037)
end
function c100423037.activate(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(c100423037.filter,tp,LOCATION_DECK,0,nil)
if g:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(100423037,0)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local sg=g:Select(tp,1,1,nil)
Duel.SendtoHand(sg,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,sg)
end
end
function c100423037.filter1(c)
return c:IsFaceup() and c:IsSetCard(0x8f,0x54,0x59,0x82)
end
function c100423037.filter2(c)
return c:IsFaceup() and c:GetLevel()>0
end
function c100423037.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c100423037.filter1(chkc) end
if chk==0 then return Duel.IsExistingTarget(c100423037.filter1,tp,LOCATION_MZONE,0,1,nil)
and Duel.IsExistingMatchingCard(c100423037.filter2,tp,LOCATION_MZONE,0,2,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
Duel.SelectTarget(tp,c100423037.filter1,tp,LOCATION_MZONE,0,1,1,nil)
end
function c100423037.operation(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and tc:IsFaceup() then
local g=Duel.GetMatchingGroup(c100423037.filter2,tp,LOCATION_MZONE,0,tc)
local lc=g:GetFirst()
local lv=tc:GetLevel()
while lc do
local e2=Effect.CreateEffect(e:GetHandler())
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_CHANGE_LEVEL)
e2:SetValue(lv)
e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
lc:RegisterEffect(e2)
lc=g:GetNext()
end
end
end
--オッドアイズ・ウィザード・ドラゴン
--Scripted by mallu11
function c100423046.initial_effect(c)
--special summon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(100423046,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOGRAVE)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_HAND)
e1:SetCost(c100423046.spcost)
e1:SetTarget(c100423046.sptg)
e1:SetOperation(c100423046.spop)
c:RegisterEffect(e1)
--to hand
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(100423046,1))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_SEARCH+CATEGORY_TOHAND)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_TO_GRAVE)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCost(c100423046.thcon)
e2:SetTarget(c100423046.thtg)
e2:SetOperation(c100423046.thop)
c:RegisterEffect(e2)
end
function c100423046.cfilter(c,tp)
return c:IsAttribute(ATTRIBUTE_DARK)
and (c:GetSequence()>4 and Duel.IsExistingMatchingCard(c100423046.filter1,tp,LOCATION_MZONE,0,1,c,tp)
or (Duel.GetMZoneCount(tp,c)>0 and Duel.IsExistingMatchingCard(c100423046.filter2,tp,LOCATION_HAND+LOCATION_DECK+LOCATION_MZONE,0,1,c)))
end
function c100423046.filter1(c,tp)
return c:IsCode(53025096) and c:IsAbleToGrave() and c:IsFaceup() and Duel.GetMZoneCount(tp,c)>0
end
function c100423046.filter2(c)
return c:IsCode(53025096) and c:IsAbleToGrave() and (c:IsFaceup() or c:IsLocation(LOCATION_HAND+LOCATION_DECK))
end
function c100423046.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckReleaseGroup(tp,c100423046.cfilter,1,nil,tp) end
local g=Duel.SelectReleaseGroup(tp,c100423046.cfilter,1,1,nil,tp)
Duel.Release(g,REASON_COST)
end
function c100423046.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_MZONE+LOCATION_HAND+LOCATION_DECK)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function c100423046.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local g=nil
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then
g=Duel.SelectMatchingCard(tp,c100423046.filter1,tp,LOCATION_MZONE,0,1,1,nil,tp)
else
g=Duel.SelectMatchingCard(tp,c100423046.filter2,tp,LOCATION_MZONE+LOCATION_HAND+LOCATION_DECK,0,1,1,nil)
end
local tc=g:GetFirst()
if tc and Duel.SendtoGrave(tc,REASON_EFFECT)~=0 and tc:IsLocation(LOCATION_GRAVE) and c:IsRelateToEffect(e) then
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
end
end
function c100423046.spfilter(c,e,tp)
return c:IsSetCard(0x99) and not c:IsCode(100423046) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c100423046.thfilter(c)
return c:IsCode(82768499) and c:IsAbleToHand()
end
function c100423046.thcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:GetPreviousControler()==tp and c:IsReason(REASON_DESTROY) and rp==1-tp
end
function c100423046.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c100423046.spfilter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK+LOCATION_GRAVE)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c100423046.thop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then
Duel.Hint(HINT_OPSELECTED,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(c100423046.spfilter),tp,LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil,e,tp)
if g:GetCount()>0 and Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)~=0
and Duel.IsExistingMatchingCard(c100423046.thfilter,tp,LOCATION_DECK,0,1,nil)
and Duel.SelectYesNo(tp,aux.Stringid(100423046,2)) then
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local tg=Duel.SelectMatchingCard(tp,c100423046.thfilter,tp,LOCATION_DECK,0,1,1,nil)
Duel.SendtoHand(tg,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,tg)
end
end
end
--Brutal Beast Battle
--Script by mercury233
function c101010084.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOGRAVE+CATEGORY_DRAW)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,101010084+EFFECT_COUNT_CODE_OATH)
e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e1:SetTarget(c101010084.target)
e1:SetOperation(c101010084.activate)
c:RegisterEffect(e1)
end
function c101010084.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
for i,p in ipairs({tp,1-tp}) do
local g=Duel.GetMatchingGroup(Card.IsFaceup,p,LOCATION_MZONE,0,nil)
for i,type in ipairs({TYPE_RITUAL,TYPE_FUSION,TYPE_SYNCHRO,TYPE_XYZ,TYPE_LINK}) do
local rg=g:Filter(Card.IsType,nil,type)
local rc=rg:GetCount()
if rc>1 then
return true
end
end
end
return false
end
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,0,0)
end
function c101010084.activate(e,tp,eg,ep,ev,re,r,rp)
tp=Duel.GetTurnPlayer()
local res={}
for i,p in ipairs({tp,1-tp}) do
local sg=Group.CreateGroup()
local g=Duel.GetMatchingGroup(Card.IsFaceup,p,LOCATION_MZONE,0,nil)
for i,type in ipairs({TYPE_RITUAL,TYPE_FUSION,TYPE_SYNCHRO,TYPE_XYZ,TYPE_LINK}) do
local rg=g:Filter(Card.IsType,nil,type)
local rc=rg:GetCount()
if rc>1 then
Duel.Hint(HINT_SELECTMSG,p,HINTMSG_TOGRAVE)
local dg=rg:Select(p,rc-1,rc-1,nil)
sg:Merge(dg)
end
end
if sg:GetCount()>0 then
res[p]=true
Duel.SendtoGrave(sg,REASON_RULE)
end
end
if res[0] or res[1] then
Duel.BreakEffect()
end
for i,p in ipairs({tp,1-tp}) do
if res[p] then
local ct=0
local g=Duel.GetMatchingGroup(Card.IsFaceup,p,LOCATION_MZONE,0,nil)
for i,type in ipairs({TYPE_RITUAL,TYPE_FUSION,TYPE_SYNCHRO,TYPE_XYZ,TYPE_LINK}) do
if g:IsExists(Card.IsType,1,nil,type) then ct=ct+1 end
end
Duel.Draw(p,ct,REASON_EFFECT)
end
end
end
......@@ -40,6 +40,7 @@ function c101011019.initial_effect(c)
e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e4:SetCode(EVENT_PHASE+PHASE_END)
e4:SetRange(LOCATION_GRAVE)
e4:SetCountLimit(1)
e4:SetCondition(c101011019.spcon2)
e4:SetTarget(c101011019.sptg2)
e4:SetOperation(c101011019.spop2)
......
......@@ -2,7 +2,7 @@
--Scripted by nekrozar
function c101011022.initial_effect(c)
c:SetUniqueOnField(1,0,101011022,LOCATION_MZONE)
c:SetUniqueOnField(1,0,101011022)
--remove
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(101011022,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