Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Y
ygopro-core
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Packages
Packages
List
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issues
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nanahira
ygopro-core
Commits
6fc3624d
Commit
6fc3624d
authored
Nov 17, 2024
by
Chen Bill
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix Duel.MajesticCopy
parent
ca69f726
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
11 deletions
+7
-11
libduel.cpp
libduel.cpp
+7
-11
No files found.
libduel.cpp
View file @
6fc3624d
...
@@ -4772,23 +4772,19 @@ int32 scriptlib::duel_majestic_copy(lua_State *L) {
...
@@ -4772,23 +4772,19 @@ int32 scriptlib::duel_majestic_copy(lua_State *L) {
check_param(L, PARAM_TYPE_CARD, 1);
check_param(L, PARAM_TYPE_CARD, 1);
check_param(L, PARAM_TYPE_CARD, 2);
check_param(L, PARAM_TYPE_CARD, 2);
card* pcard = *(card**) lua_touserdata(L, 1);
card* pcard = *(card**) lua_touserdata(L, 1);
card* ccard = *(card**) lua_touserdata(L, 2);
card* copy_target = *(card**) lua_touserdata(L, 2);
for(auto eit = ccard->single_effect.begin(); eit != ccard->field_effect.end(); ++eit) {
for(auto& peffect: copy_target->initial_effect) {
if(eit == ccard->single_effect.end()) {
if (!(peffect->type & (EFFECT_TYPES_CHAIN_LINK & ~EFFECT_TYPE_ACTIVATE)))
eit = ccard->field_effect.begin();
continue;
if(eit == ccard->field_effect.end())
if (peffect->type & EFFECT_TYPE_XMATERIAL)
break;
}
effect* peffect = eit->second;
if (!(peffect->type & 0x7c))
continue;
continue;
if (!peffect->is_
flag(EFFECT_FLAG_INITIAL
))
if (!peffect->is_
monster_effect(
))
continue;
continue;
effect* ceffect = peffect->clone();
effect* ceffect = peffect->clone();
ceffect->owner = pcard;
ceffect->owner = pcard;
ceffect->flag[0] &= ~EFFECT_FLAG_INITIAL;
ceffect->flag[0] &= ~EFFECT_FLAG_INITIAL;
ceffect->effect_owner = PLAYER_NONE;
ceffect->effect_owner = PLAYER_NONE;
ceffect->reset_flag = RESET_EVENT
+ 0x1fe0000 + RESET_PHASE + PHASE_END + RESET_SELF_TURN +
RESET_OPPO_TURN;
ceffect->reset_flag = RESET_EVENT
| RESETS_STANDARD | RESET_PHASE | PHASE_END | RESET_SELF_TURN |
RESET_OPPO_TURN;
ceffect->reset_count = 1;
ceffect->reset_count = 1;
ceffect->recharge();
ceffect->recharge();
if(ceffect->type & EFFECT_TYPE_TRIGGER_F) {
if(ceffect->type & EFFECT_TYPE_TRIGGER_F) {
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment