- [NEW] Ja funcionen els skills

- Treballant en les parts
This commit is contained in:
2024-07-02 19:01:49 +02:00
parent af6c5f43ef
commit 3e83fcdaa8
5 changed files with 123 additions and 40 deletions

View File

@@ -184,13 +184,24 @@ namespace room
if (!::editor::isEditing() && act->flags & FLAG_SPECIAL)
{
if (act->name[0]=='B') // Es un booster
{
if (act->name[0]=='B') { // Es un booster
if (actor::hero::wasBoosterCollected((act->name[3]-48)*10+(act->name[4]-48)))
{
actor::remove(act);
act = nullptr;
}
} else if (act->name[0]=='S') { // Es un skill
if (actor::hero::wasSkillCollected(&act->name[2]))
{
actor::remove(act);
act = nullptr;
}
} else if (act->name[0]=='P') { // Es una part
if (actor::hero::wasPartCollected(&act->name[2]))
{
actor::remove(act);
act = nullptr;
}
}
}
if (act) actor::setDirty(act, true);