Currently, Card.IsCode(scriptlib::card_is_code) would only check if the card code is strictly equal to one of the following:
- pcard->get_code()
- pcard->get_another_code()
However, when there exists both effect with type EFFECT_ADD_CODE and EFFECT_CHANGE_CODE, only EFFECT_CHANGE_CODE will function, while the code specified in EFFECT_ADD_CODE would not be effective on Card.IsCode (and also Card.IsSetCard) on that card. The reason of this behaviour is get_another_code will return 0 if EFFECT_CHANGE_CODE presents.
Also, when multiple EFFECT_ADD_CODE exists, it is expected that all those effects would be effective, however, under the current implementation, only the last EFFECT_ADD_CODE would be effective, other would be non-effective as well.
Is this an intended feature?
If not, may/shall I hand in an pull request on ygopro-core?
目前,函数Card.IsCode(scriptlib::card_is_code)只会检查如果卡密等于以下两者之一
- pcard->get_code()
- pcard->get_another_code()
但是,当EFFECT_ADD_CODE和EFFECT_CHANGE_CODE类效果同时存在的场合,只有EFFECT_CHANGE_CODE会生效,而EFFECT_ADD_CODE内指定的卡密不会生效。其原因为get_another_code在EFFECT_CHANGE_CODE类效果存在的场合将会直接返回0。
同时,当复数EFFECT_ADD_CODE类效果存在的场合,只有最后一个EFFECT_ADD_CODE将会被适用。
这是一个预期内的行为吗?如果不是的话,我应该提出pull request吗?
By the way, also, EFFECT_ADD_CODE would have no hints on screen.
顺带一提,EFFECT_ADD_CODE类效果在ygopro内没有提示
Currently, Card.IsCode(scriptlib::card_is_code) would only check if the card code is strictly equal to one of the following:
However, when there exists both effect with type EFFECT_ADD_CODE and EFFECT_CHANGE_CODE, only EFFECT_CHANGE_CODE will function, while the code specified in EFFECT_ADD_CODE would not be effective on Card.IsCode (and also Card.IsSetCard) on that card. The reason of this behaviour is get_another_code will return 0 if EFFECT_CHANGE_CODE presents.
Also, when multiple EFFECT_ADD_CODE exists, it is expected that all those effects would be effective, however, under the current implementation, only the last EFFECT_ADD_CODE would be effective, other would be non-effective as well.
Is this an intended feature?
If not, may/shall I hand in an pull request on ygopro-core?
目前,函数Card.IsCode(scriptlib::card_is_code)只会检查如果卡密等于以下两者之一
但是,当EFFECT_ADD_CODE和EFFECT_CHANGE_CODE类效果同时存在的场合,只有EFFECT_CHANGE_CODE会生效,而EFFECT_ADD_CODE内指定的卡密不会生效。其原因为get_another_code在EFFECT_CHANGE_CODE类效果存在的场合将会直接返回0。
同时,当复数EFFECT_ADD_CODE类效果存在的场合,只有最后一个EFFECT_ADD_CODE将会被适用。
这是一个预期内的行为吗?如果不是的话,我应该提出pull request吗?
By the way, also, EFFECT_ADD_CODE would have no hints on screen.
顺带一提,EFFECT_ADD_CODE类效果在ygopro内没有提示