Jump to content

ygopro crashing issue


Vengevoid

Recommended Posts

I'm running into a problem with ygopro crashing atm. I was using my custom card to attack all my opponent's monsters. So my opponent has 3 ojama tokens and a beta the magnet warrior. I use the effect to attack all monster. I first killed the 3 tokens and then kill beta and i crashed. but when i kill beta during the first to third attack, it doesnt crash. is it because of the script that i'm using?

Link to comment
Share on other sites

it does not crash when ojama token is attacked last. 

here's the script itself. also i'm running into another problem that was listed in another post (can still activate even if there's no required cards in the graveyard but have no effect)

.

--Lumino Voidslayer, Viper
function c20626169.initial_effect©
--Attribute Dark
local e1=Effect.CreateEffect©
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetCode(EFFECT_ADD_ATTRIBUTE)
e1:SetRange(LOCATION_MZONE)
e1:SetValue(ATTRIBUTE_DARK)
c:RegisterEffect(e1)
--pierce
local e2=Effect.CreateEffect©
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_PIERCE)
e2:SetRange(LOCATION_MZONE) 
e2:SetCondition(c20626169.condtion)
c:RegisterEffect(e2)
--atkdown
local e3=Effect.CreateEffect©
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e3:SetCode(EVENT_BATTLE_DESTROYING)
e3:SetOperation(c20626169.atkop)
c:RegisterEffect(e3)
--attack all
local e4=Effect.CreateEffect©
e4:SetDescription(aux.Stringid(20626169,0))
e4:SetType(EFFECT_TYPE_IGNITION)
e4:SetRange(LOCATION_MZONE)
e4:SetCountLimit(1)
e4:SetCost(c20626169.cost)
e4:SetOperation(c20626169.operation)
c:RegisterEffect(e4)
end
function c20626169.costfilter(c,att)
return c:IsAttribute(att) and c:IsAbleToRemoveAsCost()
end
function c20626169.cost(e,tp,eg,ep,ev,re,r,rp,chk,att)
if chk==0 then return Duel.IsExistingMatchingCard(c20626169.cfilter,tp,LOCATION_GRAVE,0,1,nil,ATTRIBUTE_LIGHT)
and Duel.IsExistingMatchingCard(c20626169.cfilter,tp,LOCATION_GRAVE,0,1,nil,ATTRIBUTE_DARK) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,c20626169.costfilter,tp,LOCATION_GRAVE,0,1,1,nil,ATTRIBUTE_LIGHT)
Duel.Remove(g,POS_FACEUP,REASON_COST)
     g=Duel.SelectMatchingCard(tp,c20626169.costfilter,tp,LOCATION_GRAVE,0,1,1,nil,ATTRIBUTE_DARK)
Duel.Remove(g,POS_FACEUP,REASON_COST)
end
function c20626169.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) and c:IsFaceup() then
local e1=Effect.CreateEffect©
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_ATTACK_ALL)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetValue(1)
e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END)
c:RegisterEffect(e1)
end
end
function c20626169.atkop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local e1=Effect.CreateEffect©
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetValue(-200)
e1:SetReset(RESET_EVENT+0x1ff0000+RESET_PHASE+PHASE_END)
c:RegisterEffect(e1)
end
 
function c20626169.condtion(e)
local c=e:GetHandler()
local ph=Duel.GetCurrentPhase()
local bc=c:GetBattleTarget()
return (ph==PHASE_DAMAGE or ph==PHASE_DAMAGE_CAL)
and c:IsRelateToBattle() and bc:IsFaceup() and bc:IsAttribute(ATTRIBUTE_FIRE) or bc:IsAttribute(ATTRIBUTE_WATER) or bc:IsAttribute(ATTRIBUTE_WIND) or bc:IsAttribute(ATTRIBUTE_EARTH) or bc:IsAttribute(ATTRIBUTE_DIVINE) 
end
Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...