Create a lua script for a field card that turns all your normal spells in "Quick spell"…
- User
Create a lua script for a field card that turns all your normal spells in "Quick spell" in edopro
- Assistant
Create a lua script for a field card that turns all your normal spells in "Quick spell" in edopro
Certainly! Below is a Lua script for EDOPRO that creates a Field Spell Card with the effect of turning all your Normal Spell Cards in your hand into Quick-Play Spell Cards. This allows you to activate them during either player's turn, just like Quick-Play Spells.
--Field Spell: Quickening Grounds
--Scripted by [Your Name]
local s,id=GetID()
function s.initial_effect(c)
--Change Normal Spells in hand to Quick-Play Spells
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_ADD_TYPE)
e1:SetProperty(EFFECT_FLAG_SET_AVAILABLE)
e1:SetTargetRange(LOCATION_HAND,0)
e1:SetTarget(s.tg)
e1:SetValue(TYPE_QUICKPLAY)
c:RegisterEffect(e1)
--Remove Normal Type from those Spells
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_REMOVE_TYPE)
e2:SetProperty(EFFECT_FLAG_SET_AVAILABLE)
e2:SetTargetRange(LOCATION_HAND,0)
e2:SetTarget(s.tg)
e2:SetValue(TYPE_NORMAL)
c:RegisterEffect(e2)
--Allow activation of Quick-Play Spells from hand during opponent's turn
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD)
e3:SetCode(EFFECT_QP_ACT_IN_NTPHAND)
e3:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e3:SetTargetRange(1,0)
c:RegisterEffect(e3)
end
function s.tg(e,c)
return c:IsType(TYPE_SPELL) and c:IsType(TYPE_NORMAL)
end
Explanation:
Effect e1: This effect adds the Quick-Play type to all Normal Spell Cards in your hand. This effectively turns them into Quick-Play Spells.
Effect e2: This effect removes the Normal type from those Spell Cards, so they are no longer considered Normal Spells but Quick-Play Spells instead.
Effect e3: This effect allows you to activate Quick-Play Spell Cards from your hand during your opponent's turn. Since your Normal Spells are now treated as Quick-Play Spells, this lets you use them at any time.
Usage:
Copy the script above into a new Lua file within your EDOPRO script directory. Name the file with a unique identifier, e.g., c100000001.lua.
In your EDOPRO cards.cdb database, create a new card entry for your Field Spell Card:
Use the card in your deck. When you activate "Quickening Grounds," all your Normal Spells in your hand will be treated as Quick-Play Spells, allowing you to activate them during either player's turn.
Notes:
This effect only applies to Normal Spell Cards in your hand. Normal Spells in your Deck, Graveyard, or on the field are unaffected.
Be mindful that changing card types can have interactions with other cards that specify "Normal Spell Cards." Since the Normal type is removed, they won't be recognized as Normal Spells by other effects.
Disclaimer:
Custom scripts and cards should be tested thoroughly to ensure they work as intended and do not cause unexpected interactions or crashes within the game.
Make sure to follow any guidelines provided by EDOPRO for adding custom content, and be aware that using custom cards may not be allowed in official or ranked duels.
Feel free to adjust the script or card attributes to better suit your needs!