-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
fervi
committed
Dec 7, 2017
1 parent
9496589
commit 2e978ad
Showing
3 changed files
with
50 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
text = "Cursed Dice"; | ||
eftext = "Roll a dice. All opponent monsters lose ATK and DEF equal to the result * 100, until the End Phase."; | ||
|
||
id=1025; | ||
alias=0; | ||
type=4; | ||
atk=0; | ||
def=0; | ||
level=0; | ||
race=0; | ||
attribute=0; | ||
limit=3; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
function c1025.initial_effect(c) | ||
--Activate | ||
local e1=Effect.CreateEffect(c) | ||
e1:SetCategory(CATEGORY_ATKCHANGE) | ||
e1:SetType(EFFECT_TYPE_ACTIVATE) | ||
e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP) | ||
e1:SetCode(EVENT_FREE_CHAIN) | ||
e1:SetHintTiming(TIMING_DAMAGE_STEP) | ||
e1:SetCondition(c1025.condition) | ||
e1:SetTarget(c1025.target) | ||
e1:SetOperation(c1025.activate) | ||
c:RegisterEffect(e1) | ||
end | ||
function c1025.condition(e,tp,eg,ep,ev,re,r,rp) | ||
return Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated() | ||
end | ||
function c1025.target(e,tp,eg,ep,ev,re,r,rp,chk) | ||
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsFaceup,tp,0,LOCATION_MZONE,1,nil) end | ||
end | ||
function c1025.activate(e,tp,eg,ep,ev,re,r,rp) | ||
local g=Duel.GetMatchingGroup(Card.IsFaceup,tp,0,LOCATION_MZONE,nil) | ||
if g:GetCount()>0 then | ||
local d=Duel.TossDice(tp,1)*100 | ||
local sc=g:GetFirst() | ||
while sc do | ||
local e1=Effect.CreateEffect(e:GetHandler()) | ||
e1:SetType(EFFECT_TYPE_SINGLE) | ||
e1:SetCode(EFFECT_UPDATE_ATTACK) | ||
e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) | ||
e1:SetValue(-d) | ||
sc:RegisterEffect(e1) | ||
local e2=e1:Clone() | ||
e2:SetCode(EFFECT_UPDATE_DEFENSE) | ||
sc:RegisterEffect(e2) | ||
sc=g:GetNext() | ||
end | ||
end | ||
end |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.