Commit 6465ce8e authored by mercury233's avatar mercury233

update scripts

parent 614e5e5f
...@@ -43,8 +43,9 @@ function c101011005.spop(e,tp,eg,ep,ev,re,r,rp) ...@@ -43,8 +43,9 @@ function c101011005.spop(e,tp,eg,ep,ev,re,r,rp)
end end
end end
function c101011005.thcost(e,tp,eg,ep,ev,re,r,rp,chk) function c101011005.thcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckReleaseGroup(tp,Card.IsRace,1,nil,RACE_CYBERSE) end local c=e:GetHandler()
local g=Duel.SelectReleaseGroup(tp,Card.IsRace,1,1,nil,RACE_CYBERSE) if chk==0 then return Duel.CheckReleaseGroup(tp,Card.IsRace,1,c,RACE_CYBERSE) end
local g=Duel.SelectReleaseGroup(tp,Card.IsRace,1,1,c,RACE_CYBERSE)
e:SetLabel(g:GetFirst():GetType()) e:SetLabel(g:GetFirst():GetType())
Duel.Release(g,REASON_COST) Duel.Release(g,REASON_COST)
end end
......
--虚の王 ウートガルザ
--Scripted by nekrozar
function c101011022.initial_effect(c)
c:SetUniqueOnField(1,0,101011022)
--remove
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(101011022,0))
e1:SetCategory(CATEGORY_REMOVE)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1,101011022)
e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e1:SetCost(c101011022.rmcost)
e1:SetTarget(c101011022.rmtg)
e1:SetOperation(c101011022.rmop)
c:RegisterEffect(e1)
end
function c101011022.costfilter(c)
return c:IsSetCard(0x134) or c:IsRace(RACE_ROCK)
end
function c101011022.fselect(g,tp)
if Duel.IsExistingTarget(Card.IsAbleToRemove,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,g) then
Duel.SetSelectedCard(g)
return Duel.CheckReleaseGroup(tp,nil,0,nil)
else return false end
end
function c101011022.rmcost(e,tp,eg,ep,ev,re,r,rp,chk)
local g=Duel.GetReleaseGroup(tp):Filter(c101011022.costfilter,nil)
if chk==0 then return g:CheckSubGroup(c101011022.fselect,2,2,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local rg=g:SelectSubGroup(tp,c101011022.fselect,false,2,2,tp)
Duel.Release(rg,REASON_COST)
end
function c101011022.rmtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_ONFIELD) and chkc:IsAbleToRemove() end
if chk==0 then return true end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectTarget(tp,Card.IsAbleToRemove,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,1,0,0)
end
function c101011022.rmop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.Remove(tc,POS_FACEUP,REASON_EFFECT)
end
end
--Aiシャドー
--Scripted by mallu11
function c101011069.initial_effect(c)
--activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_CONTINUOUS_TARGET)
e1:SetCondition(c101011069.condition)
e1:SetTarget(c101011069.target)
e1:SetOperation(c101011069.activate)
c:RegisterEffect(e1)
--atk up
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_UPDATE_ATTACK)
e2:SetRange(LOCATION_SZONE)
e2:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE)
e2:SetValue(800)
e2:SetTarget(aux.ctg)
c:RegisterEffect(e2)
--must attack
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD)
e3:SetCode(EFFECT_MUST_ATTACK)
e3:SetRange(LOCATION_SZONE)
e3:SetTargetRange(0,LOCATION_MZONE)
c:RegisterEffect(e3)
--only attack monster
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_FIELD)
e4:SetCode(EFFECT_ONLY_ATTACK_MONSTER)
e4:SetRange(LOCATION_SZONE)
e4:SetTargetRange(0,LOCATION_MZONE)
e4:SetValue(aux.ctg)
c:RegisterEffect(e4)
--draw
local e5=Effect.CreateEffect(c)
e5:SetCategory(CATEGORY_DRAW)
e5:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e5:SetCode(EVENT_TO_GRAVE)
e5:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e5:SetCountLimit(1,101011069)
e5:SetCondition(c101011069.drcon)
e5:SetTarget(c101011069.drtg)
e5:SetOperation(c101011069.drop)
c:RegisterEffect(e5)
local e6=e5:Clone()
e6:SetCode(EVENT_REMOVE)
c:RegisterEffect(e6)
end
function c101011069.cfilter(c)
return c:IsFaceup() and c:IsSetCard(0x235)
end
function c101011069.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated()
end
function c101011069.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c101011069.cfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c101011069.cfilter,tp,LOCATION_MZONE,0,1,nil) end
Duel.SelectTarget(tp,c101011069.cfilter,tp,LOCATION_MZONE,0,1,1,nil)
end
function c101011069.activate(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if c:IsRelateToEffect(e) and tc:IsRelateToEffect(e) then
c:SetCardTarget(tc)
end
end
function c101011069.drcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsPreviousPosition(POS_FACEUP) and c:IsPreviousLocation(LOCATION_SZONE) and c:GetPreviousControler()==tp
and c:IsReason(REASON_EFFECT) and rp==1-tp
end
function c101011069.drtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetTargetPlayer(tp)
Duel.SetTargetParam(1)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1)
end
function c101011069.drop(e,tp,eg,ep,ev,re,r,rp)
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
Duel.Draw(p,d,REASON_EFFECT)
end
--アームズ・コール
--Scripted by nekrozar
function c101011077.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH+CATEGORY_EQUIP)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,101011077+EFFECT_COUNT_CODE_OATH)
e1:SetTarget(c101011077.target)
e1:SetOperation(c101011077.activate)
c:RegisterEffect(e1)
end
function c101011077.filter(c)
return c:IsType(TYPE_EQUIP) and c:IsAbleToHand()
end
function c101011077.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c101011077.filter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c101011077.eqfilter(c,tc)
return c:IsFaceup() and tc:CheckEquipTarget(c)
end
function c101011077.activate(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g1=Duel.SelectMatchingCard(tp,c101011077.filter,tp,LOCATION_DECK,0,1,1,nil)
local tc=g1:GetFirst()
if tc and Duel.SendtoHand(tc,nil,REASON_EFFECT)~=0 and tc:IsLocation(LOCATION_HAND) then
Duel.ConfirmCards(1-tp,g1)
local g2=Duel.GetMatchingGroup(c101011077.eqfilter,tp,LOCATION_MZONE,0,nil,tc)
if tc:CheckUniqueOnField(tp) and not tc:IsForbidden() and Duel.GetLocationCount(tp,LOCATION_SZONE)>0
and g2:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(101011077,0)) then
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
local sg=g2:Select(tp,1,1,nil)
Duel.Equip(tp,tc,sg:GetFirst())
end
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