Skip to content

Commit

Permalink
Remove CHAININFO::CHAIN_COUNT
Browse files Browse the repository at this point in the history
It was entirely redoundant as the info it returned are obtainable via Duel.GetCurrentChain in the case the passed index was 0, and in any other circumstance the returned information was needed already to call Duel.GetChainInfo in first place
  • Loading branch information
edo9300 committed Dec 9, 2023
1 parent cd4e7af commit b85d41d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 6 deletions.
5 changes: 2 additions & 3 deletions field.h
Original file line number Diff line number Diff line change
Expand Up @@ -707,9 +707,8 @@ class field {
#define CHAIN_HAND_TRIGGER 0x20
//#define CHAIN_DECK_EFFECT 0x40

enum class CHAININFO : uint16_t {
CHAIN_COUNT = 1,
TRIGGERING_EFFECT,
enum class CHAININFO {
TRIGGERING_EFFECT = 1,
TRIGGERING_PLAYER,
TRIGGERING_CONTROLER,
TRIGGERING_LOCATION,
Expand Down
3 changes: 0 additions & 3 deletions libduel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1881,9 +1881,6 @@ LUA_STATIC_FUNCTION(GetChainInfo) {
lua_iterate_table_or_stack(L, 2, top, [L, ch, pduel]() -> int {
auto flag = lua_get<CHAININFO>(L, -1);
switch(flag) {
case CHAININFO::CHAIN_COUNT:
lua_pushinteger(L, ch->chain_count);
break;
case CHAININFO::TRIGGERING_EFFECT:
interpreter::pushobject(L, ch->triggering_effect);
break;
Expand Down

0 comments on commit b85d41d

Please sign in to comment.