Commit fc97dc3c authored by salix5's avatar salix5

fix cosplay

parent 3a5f8970
...@@ -223,7 +223,6 @@ bool Game::Initialize() { ...@@ -223,7 +223,6 @@ bool Game::Initialize() {
chkAutoPos->setChecked(true); chkAutoPos->setChecked(true);
chkRandomPos = env->addCheckBox(false, rect<s32>(40, 50, 300, 75), tabSystem, -1, dataManager.GetSysString(1275)); chkRandomPos = env->addCheckBox(false, rect<s32>(40, 50, 300, 75), tabSystem, -1, dataManager.GetSysString(1275));
chkAutoChain = env->addCheckBox(false, rect<s32>(20, 80, 280, 105), tabSystem, -1, dataManager.GetSysString(1276)); chkAutoChain = env->addCheckBox(false, rect<s32>(20, 80, 280, 105), tabSystem, -1, dataManager.GetSysString(1276));
chkAutoChain->setChecked(true);
chkWaitChain = env->addCheckBox(false, rect<s32>(20, 110, 280, 135), tabSystem, -1, dataManager.GetSysString(1277)); chkWaitChain = env->addCheckBox(false, rect<s32>(20, 110, 280, 135), tabSystem, -1, dataManager.GetSysString(1277));
chkIgnore1 = env->addCheckBox(false, rect<s32>(20, 170, 280, 195), tabSystem, -1, dataManager.GetSysString(1290)); chkIgnore1 = env->addCheckBox(false, rect<s32>(20, 170, 280, 195), tabSystem, -1, dataManager.GetSysString(1290));
chkIgnore2 = env->addCheckBox(false, rect<s32>(20, 200, 280, 225), tabSystem, -1, dataManager.GetSysString(1291)); chkIgnore2 = env->addCheckBox(false, rect<s32>(20, 200, 280, 225), tabSystem, -1, dataManager.GetSysString(1291));
......
...@@ -52,8 +52,22 @@ function c2067935.rmop(e,tp,eg,ep,ev,re,r,rp) ...@@ -52,8 +52,22 @@ function c2067935.rmop(e,tp,eg,ep,ev,re,r,rp)
e1:SetValue(code) e1:SetValue(code)
e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END)
c:RegisterEffect(e1) c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(89312388,1))
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_PHASE+PHASE_END)
e2:SetCountLimit(1)
e2:SetRange(LOCATION_MZONE)
e2:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END)
e2:SetLabelObject(e1)
e2:SetOperation(c2067935.rstop)
c:RegisterEffect(e2)
end end
end end
function c2067935.rstop(e,tp,eg,ep,ev,re,r,rp)
local e1=e:GetLabelObject()
e1:Reset()
end
function c2067935.spcon(e,tp,eg,ep,ev,re,r,rp) function c2067935.spcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetBattledGroupCount()>0 return e:GetHandler():GetBattledGroupCount()>0
end end
......
...@@ -50,9 +50,30 @@ function c30312361.operation(e,tp,eg,ep,ev,re,r,rp) ...@@ -50,9 +50,30 @@ function c30312361.operation(e,tp,eg,ep,ev,re,r,rp)
e2:SetType(EFFECT_TYPE_SINGLE) e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e2:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+RESET_END) e2:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+RESET_END)
e2:SetLabelObject(e1)
e2:SetCode(EFFECT_SET_BASE_ATTACK) e2:SetCode(EFFECT_SET_BASE_ATTACK)
e2:SetValue(ba) e2:SetValue(ba)
c:RegisterEffect(e2) c:RegisterEffect(e2)
c:CopyEffect(code,RESET_EVENT+0x1fe0000+RESET_PHASE+RESET_END,1) local cid=c:CopyEffect(code,RESET_EVENT+0x1fe0000+RESET_PHASE+RESET_END,1)
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(30312361,1))
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e3:SetCode(EVENT_PHASE+PHASE_END)
e3:SetCountLimit(1)
e3:SetRange(LOCATION_MZONE)
e3:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+RESET_END)
e3:SetLabel(cid)
e3:SetLabelObject(e2)
e3:SetOperation(c30312361.rstop)
c:RegisterEffect(e3)
end end
end end
function c30312361.rstop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local cid=e:GetLabel()
c:ResetEffect(cid,RESET_COPY)
local e2=e:GetLabelObject()
local e1=e2:GetLabelObject()
e1:Reset()
e2:Reset()
end
...@@ -99,13 +99,28 @@ function c31111109.copyop(e,tp,eg,ep,ev,re,r,rp) ...@@ -99,13 +99,28 @@ function c31111109.copyop(e,tp,eg,ep,ev,re,r,rp)
if c:IsRelateToEffect(e) and c:IsFaceup() and tc:IsRelateToEffect(e) then if c:IsRelateToEffect(e) and c:IsFaceup() and tc:IsRelateToEffect(e) then
if Duel.Remove(tc,POS_FACEUP,REASON_EFFECT)~=1 then return end if Duel.Remove(tc,POS_FACEUP,REASON_EFFECT)~=1 then return end
local code=tc:GetOriginalCode() local code=tc:GetOriginalCode()
c:CopyEffect(code,RESET_EVENT+0x1fe0000+RESET_PHASE+RESET_END,1) local cid=c:CopyEffect(code,RESET_EVENT+0x1fe0000+RESET_PHASE+RESET_END,1)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_COPY_INHERIT)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetValue(500)
e1:SetReset(RESET_EVENT+0x1ff0000)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE) e2:SetDescription(aux.Stringid(31111109,1))
e2:SetProperty(EFFECT_FLAG_COPY_INHERIT) e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EFFECT_UPDATE_ATTACK) e2:SetCode(EVENT_PHASE+PHASE_END)
e2:SetValue(500) e2:SetCountLimit(1)
e2:SetReset(RESET_EVENT+0x1ff0000) e2:SetRange(LOCATION_MZONE)
e2:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+RESET_END)
e2:SetLabel(cid)
e2:SetOperation(c31111109.rstop)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
end end
function c31111109.rstop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local cid=e:GetLabel()
c:ResetEffect(cid,RESET_COPY)
end
...@@ -20,8 +20,9 @@ end ...@@ -20,8 +20,9 @@ end
function c43237273.operation(e,tp,eg,ep,ev,re,r,rp) function c43237273.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if tc and c:IsRelateToEffect(e) and c:IsFaceup() and tc:IsRelateToEffect(e) then if tc and c:IsRelateToEffect(e) and c:IsFaceup() and tc:IsRelateToEffect(e) and not tc:IsType(TYPE_TOKEN) then
local code=tc:GetOriginalCode() local code=tc:GetOriginalCode()
local cid=0
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
...@@ -29,8 +30,26 @@ function c43237273.operation(e,tp,eg,ep,ev,re,r,rp) ...@@ -29,8 +30,26 @@ function c43237273.operation(e,tp,eg,ep,ev,re,r,rp)
e1:SetCode(EFFECT_CHANGE_CODE) e1:SetCode(EFFECT_CHANGE_CODE)
e1:SetValue(code) e1:SetValue(code)
c:RegisterEffect(e1) c:RegisterEffect(e1)
if not tc:IsType(TYPE_TOKEN+TYPE_TRAPMONSTER) then if not tc:IsType(TYPE_TRAPMONSTER) then
c:CopyEffect(code, RESET_EVENT+0x1fe0000+RESET_PHASE+RESET_END, 1) cid=c:CopyEffect(code, RESET_EVENT+0x1fe0000+RESET_PHASE+RESET_END, 1)
end end
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(43237273,1))
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_PHASE+PHASE_END)
e2:SetCountLimit(1)
e2:SetRange(LOCATION_MZONE)
e2:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+RESET_END)
e2:SetLabelObject(e1)
e2:SetLabel(cid)
e2:SetOperation(c43237273.rstop)
c:RegisterEffect(e2)
end end
end end
function c43237273.rstop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local cid=e:GetLabel()
if cid~=0 then c:ResetEffect(cid,RESET_COPY) end
local e1=e:GetLabelObject()
e1:Reset()
end
...@@ -51,8 +51,30 @@ function c67926903.copyop(e,tp,eg,ep,ev,re,r,rp) ...@@ -51,8 +51,30 @@ function c67926903.copyop(e,tp,eg,ep,ev,re,r,rp)
e1:SetCode(EFFECT_CHANGE_CODE) e1:SetCode(EFFECT_CHANGE_CODE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetValue(code) e1:SetValue(code)
e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+RESET_END,2) e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+RESET_END+RESET_OPPO_TURN)
c:RegisterEffect(e1) c:RegisterEffect(e1)
c:CopyEffect(code,RESET_EVENT+0x1fe0000+RESET_PHASE+RESET_END,2) local cid=c:CopyEffect(code,RESET_EVENT+0x1fe0000+RESET_PHASE+RESET_END+RESET_OPPO_TURN)
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(67926903,2))
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_PHASE+PHASE_END)
e2:SetCountLimit(1)
e2:SetRange(LOCATION_MZONE)
e2:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+RESET_END+RESET_OPPO_TURN)
e2:SetLabel(cid)
e2:SetLabelObject(e1)
e2:SetCondition(c67926903.rstcon)
e2:SetOperation(c67926903.rstop)
c:RegisterEffect(e2)
end end
end end
function c67926903.rstcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()~=tp
end
function c67926903.rstop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local cid=e:GetLabel()
c:ResetEffect(cid,RESET_COPY)
local e1=e:GetLabelObject()
e1:Reset()
end
\ No newline at end of file
...@@ -42,4 +42,18 @@ function c89312388.cosoperation(e,tp,eg,ep,ev,re,r,rp) ...@@ -42,4 +42,18 @@ function c89312388.cosoperation(e,tp,eg,ep,ev,re,r,rp)
e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END)
e1:SetValue(e:GetLabel()) e1:SetValue(e:GetLabel())
c:RegisterEffect(e1) c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(89312388,1))
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_PHASE+PHASE_END)
e2:SetCountLimit(1)
e2:SetRange(LOCATION_MZONE)
e2:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END)
e2:SetLabelObject(e1)
e2:SetOperation(c89312388.rstop)
c:RegisterEffect(e2)
end
function c89312388.rstop(e,tp,eg,ep,ev,re,r,rp)
local e1=e:GetLabelObject()
e1:Reset()
end end
...@@ -44,9 +44,27 @@ function c95453143.operation(e,tp,eg,ep,ev,re,r,rp) ...@@ -44,9 +44,27 @@ function c95453143.operation(e,tp,eg,ep,ev,re,r,rp)
e1:SetCode(EFFECT_CHANGE_CODE) e1:SetCode(EFFECT_CHANGE_CODE)
e1:SetValue(code) e1:SetValue(code)
c:RegisterEffect(e1) c:RegisterEffect(e1)
c:CopyEffect(code, RESET_EVENT+0x1fe0000+RESET_PHASE+RESET_END, 1) local cid=c:CopyEffect(code,RESET_EVENT+0x1fe0000+RESET_PHASE+RESET_END,1)
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(95453143,2))
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_PHASE+PHASE_END)
e2:SetCountLimit(1)
e2:SetRange(LOCATION_MZONE)
e2:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+RESET_END)
e2:SetLabelObject(e1)
e2:SetLabel(cid)
e2:SetOperation(c95453143.rstop)
c:RegisterEffect(e2)
end end
end end
function c95453143.rstop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local cid=e:GetLabel()
c:ResetEffect(cid,RESET_COPY)
local e1=e:GetLabelObject()
e1:Reset()
end
function c95453143.thcon(e,tp,eg,ep,ev,re,r,rp) function c95453143.thcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsReason(REASON_DESTROY) return e:GetHandler():IsReason(REASON_DESTROY)
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