Skip to content
This repository was archived by the owner on Jun 22, 2018. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 38 additions & 0 deletions script/c17285476.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
--ナチュル・モスキート
function c17285476.initial_effect(c)
--special summon
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetRange(LOCATION_MZONE)
e1:SetCode(EFFECT_CANNOT_BE_BATTLE_TARGET)
e1:SetCondition(c17285476.atcon)
e1:SetValue(aux.imval1)
c:RegisterEffect(e1)
--reflect
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_PRE_BATTLE_DAMAGE)
e2:SetRange(LOCATION_MZONE)
e2:SetCondition(c17285476.refcon)
e2:SetOperation(c17285476.refop)
c:RegisterEffect(e2)
end
function c17285476.cfilter(c)
return c:IsFaceup() and c:IsSetCard(0x2a)
end
function c17285476.atcon(e)
return Duel.IsExistingMatchingCard(c17285476.cfilter,e:GetOwnerPlayer(),LOCATION_MZONE,0,1,e:GetHandler())
end
function c17285476.reftg(e,c)
return c~=e:GetHandler() and c:IsFaceup() and c:IsSetCard(0x2a)
end
function c17285476.refcon(e,tp,eg,ep,ev,re,r,rp)
local c=eg:GetFirst():GetBattleTarget()
return ep==tp and c:IsRelateToBattle() and c17285476.reftg(e,c)
end
function c17285476.refop(e,tp,eg,ep,ev,re,r,rp)
local dam=Duel.GetBattleDamage(tp)
Duel.ChangeBattleDamage(1-tp,dam,false)
Duel.ChangeBattleDamage(tp,0)
end
66 changes: 66 additions & 0 deletions script/c24874630.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
--デビルズ・サンクチュアリ
function c24874630.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetTarget(c24874630.target)
e1:SetOperation(c24874630.activate)
c:RegisterEffect(e1)
end
function c24874630.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsPlayerCanSpecialSummonMonster(tp,24874631,0,0x4011,0,0,1,RACE_FIEND,ATTRIBUTE_DARK) end
Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,0,0)
end
function c24874630.activate(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0
or not Duel.IsPlayerCanSpecialSummonMonster(tp,24874631,0,0x4011,0,0,1,RACE_FIEND,ATTRIBUTE_DARK) then return end
local token=Duel.CreateToken(tp,24874631)
Duel.SpecialSummon(token,0,tp,tp,false,false,POS_FACEUP)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CANNOT_ATTACK)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetReset(RESET_EVENT+0x1fe0000)
token:RegisterEffect(e1,true)
local e2=Effect.CreateEffect(e:GetHandler())
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_PRE_BATTLE_DAMAGE)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e2:SetCondition(c24874630.damcon)
e2:SetOperation(c24874630.damop)
e2:SetReset(RESET_EVENT+0x1fe0000)
token:RegisterEffect(e2,true)
local e3=Effect.CreateEffect(e:GetHandler())
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e3:SetRange(LOCATION_MZONE)
e3:SetCode(EVENT_PHASE+PHASE_STANDBY)
e3:SetCountLimit(1)
e3:SetCondition(c24874630.descon)
e3:SetOperation(c24874630.desop)
e3:SetReset(RESET_EVENT+0x1fe0000)
token:RegisterEffect(e3,true)
end
function c24874630.descon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()==tp
end
function c24874630.desop(e,tp,eg,ep,ev,re,r,rp)
if Duel.CheckLPCost(tp,1000) and Duel.SelectYesNo(tp,aux.Stringid(24874630,0)) then
Duel.PayLPCost(tp,1000)
else
Duel.Destroy(e:GetHandler(),REASON_COST)
end
end
function c24874630.damcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return ep==tp and c:IsRelateToBattle() and eg:GetFirst()==c:GetBattleTarget()
end
function c24874630.damop(e,tp,eg,ep,ev,re,r,rp)
local dam=Duel.GetBattleDamage(tp)
Duel.ChangeBattleDamage(1-tp,dam,false)
Duel.ChangeBattleDamage(tp,0)
end
62 changes: 62 additions & 0 deletions script/c29552709.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
--ダイガスタ・スフィアード
function c29552709.initial_effect(c)
--synchro summon
aux.AddSynchroProcedure(c,nil,aux.NonTuner(Card.IsSetCard,0x10),1)
c:EnableReviveLimit()
--to hand
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(29552709,0))
e1:SetCategory(CATEGORY_TOHAND)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetCondition(c29552709.condition)
e1:SetTarget(c29552709.target)
e1:SetOperation(c29552709.operation)
c:RegisterEffect(e1)
--reflect
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_PRE_BATTLE_DAMAGE)
e2:SetRange(LOCATION_MZONE)
e2:SetCondition(c29552709.refcon)
e2:SetOperation(c29552709.refop)
c:RegisterEffect(e2)
--indes
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_INDESTRUCTABLE_BATTLE)
e3:SetValue(1)
c:RegisterEffect(e3)
end
function c29552709.reftg(e,c)
return c:IsSetCard(0x10)
end
function c29552709.refcon(e,tp,eg,ep,ev,re,r,rp)
local c=eg:GetFirst():GetBattleTarget()
return ep==tp and c:IsRelateToBattle() and c29552709.reftg(e,c)
end
function c29552709.refop(e,tp,eg,ep,ev,re,r,rp)
local dam=Duel.GetBattleDamage(tp)
Duel.ChangeBattleDamage(1-tp,dam,false)
Duel.ChangeBattleDamage(tp,0)
end
function c29552709.condition(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetSummonType()==SUMMON_TYPE_SYNCHRO
end
function c29552709.filter(c)
return c:IsSetCard(0x10) and c:IsAbleToHand()
end
function c29552709.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c29552709.filter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c29552709.filter,tp,LOCATION_GRAVE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectTarget(tp,c29552709.filter,tp,LOCATION_GRAVE,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0)
end
function c29552709.operation(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.SendtoHand(tc,nil,REASON_EFFECT)
end
end
73 changes: 73 additions & 0 deletions script/c35494087.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
--SRビードロ・ドクロ
--Speedroid Vidroskull
--Script by nekrozar
function c35494087.initial_effect(c)
--special summon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(35494087,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_PHASE+PHASE_STANDBY)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1)
e1:SetCondition(c35494087.spcon)
e1:SetTarget(c35494087.sptg)
e1:SetOperation(c35494087.spop)
c:RegisterEffect(e1)
--indes
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_INDESTRUCTABLE_BATTLE)
e2:SetValue(c35494087.indval)
c:RegisterEffect(e2)
--battle damage
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e3:SetCode(EVENT_PRE_BATTLE_DAMAGE)
e3:SetRange(LOCATION_MZONE)
e3:SetCondition(c35494087.damcon)
e3:SetOperation(c35494087.damop)
c:RegisterEffect(e3)
--self destroy
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_SINGLE)
e4:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e4:SetCode(EFFECT_SELF_DESTROY)
e4:SetRange(LOCATION_MZONE)
e4:SetCondition(c35494087.sdcon)
c:RegisterEffect(e4)
end
function c35494087.spcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(aux.FilterEqualFunction(Card.GetSummonLocation,LOCATION_EXTRA),tp,0,LOCATION_MZONE,1,nil)
end
function c35494087.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function c35494087.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
if Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)==0 and Duel.GetLocationCount(tp,LOCATION_MZONE)<=0
and c:IsCanBeSpecialSummoned(e,0,tp,false,false) then
Duel.SendtoGrave(c,REASON_RULE)
end
end
function c35494087.indval(e,c)
return bit.band(c:GetSummonType(),SUMMON_TYPE_NORMAL)~=0
end
function c35494087.sdfilter(c)
return c:IsFaceup() and not c:IsSetCard(0x2016)
end
function c35494087.sdcon(e)
return Duel.IsExistingMatchingCard(c35494087.sdfilter,e:GetHandlerPlayer(),LOCATION_MZONE,0,1,nil)
end
function c35494087.damcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return ep==tp and c:IsRelateToBattle() and eg:GetFirst()==c:GetBattleTarget()
end
function c35494087.damop(e,tp,eg,ep,ev,re,r,rp)
local dam=Duel.GetBattleDamage(tp)
Duel.ChangeBattleDamage(1-tp,dam,false)
Duel.ChangeBattleDamage(tp,0)
end
21 changes: 21 additions & 0 deletions script/c3918345.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
--マジック・スライム
function c3918345.initial_effect(c)
aux.EnableDualAttribute(c)
--reflect battle dam
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_PRE_BATTLE_DAMAGE)
e1:SetRange(LOCATION_MZONE)
e1:SetCondition(c3918345.damcon)
e1:SetOperation(c3918345.damop)
c:RegisterEffect(e1)
end
function c3918345.damcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return ep==tp and c:IsRelateToBattle() and eg:GetFirst()==c:GetBattleTarget() and aux.IsDualState(e)
end
function c3918345.damop(e,tp,eg,ep,ev,re,r,rp)
local dam=Duel.GetBattleDamage(tp)
Duel.ChangeBattleDamage(1-tp,dam,false)
Duel.ChangeBattleDamage(tp,0)
end
86 changes: 86 additions & 0 deletions script/c49551909.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
--ヒロイック・リベンジ・ソード
function c49551909.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_EQUIP)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(TIMING_BATTLE_PHASE)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetTarget(c49551909.target)
e1:SetOperation(c49551909.operation)
c:RegisterEffect(e1)
end
function c49551909.filter(c)
return c:IsFaceup() and c:IsSetCard(0x6f)
end
function c49551909.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and c49551909.filter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c49551909.filter,tp,LOCATION_MZONE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
local g=Duel.SelectTarget(tp,c49551909.filter,tp,LOCATION_MZONE,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,0,0)
end
function c49551909.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsLocation(LOCATION_SZONE) then return end
local tc=Duel.GetFirstTarget()
if c:IsRelateToEffect(e) and tc:IsRelateToEffect(e) and tc:IsFaceup() then
Duel.Equip(tp,c,tc)
c:CancelToGrave()
--destroy
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
e1:SetCategory(CATEGORY_DESTROY)
e1:SetDescription(aux.Stringid(49551909,0))
e1:SetCode(EVENT_BATTLED)
e1:SetRange(LOCATION_SZONE)
e1:SetCondition(c49551909.descon)
e1:SetTarget(c49551909.destg)
e1:SetOperation(c49551909.desop)
e1:SetReset(RESET_EVENT+0x1fe0000)
c:RegisterEffect(e1)
--damage
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_PRE_BATTLE_DAMAGE)
e2:SetRange(LOCATION_SZONE)
e2:SetCondition(c49551909.damcon)
e2:SetOperation(c49551909.damop)
e2:SetReset(RESET_EVENT+0x1fe0000)
c:RegisterEffect(e2)
--Equip limit
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_EQUIP_LIMIT)
e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e3:SetValue(c49551909.eqlimit)
e3:SetReset(RESET_EVENT+0x1fe0000)
c:RegisterEffect(e3)
end
end
function c49551909.eqlimit(e,c)
return c:GetControler()==e:GetOwnerPlayer() and c:IsSetCard(0x6f)
end
function c49551909.descon(e,tp,eg,ep,ev,re,r,rp)
local ec=e:GetHandler():GetEquipTarget()
return Duel.GetAttackTarget()==ec or (Duel.GetAttacker()==ec and Duel.GetAttackTarget())
end
function c49551909.destg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_DESTROY,e:GetHandler():GetEquipTarget():GetBattleTarget(),1,0,0)
end
function c49551909.desop(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) then return end
local bc=e:GetHandler():GetEquipTarget():GetBattleTarget()
if bc:IsRelateToBattle() then
Duel.Destroy(bc,REASON_EFFECT)
end
end
function c49551909.damcon(e,tp,eg,ep,ev,re,r,rp)
local ec=e:GetHandler():GetEquipTarget()
return ec and ep==tp and (Duel.GetAttacker()==ec or Duel.GetAttackTarget()==ec)
end
function c49551909.damop(e,tp,eg,ep,ev,re,r,rp)
Duel.ChangeBattleDamage(1-tp,Duel.GetBattleDamage(tp),false)
end
Loading