You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
Some skills can only be used once per turn or round on the same entity. Turn and Round is so closely related that they can often just conbined to once per round.
If we want to track whether we already used a skill on an entity we can do either of two things:
add a dummy skill on the target which is removed at the end of the round, which we then check for
add a flag in the tactical manager that consists of a combination of the targeted entity id and the skill id, which we then check for. This flag will then have the round written into it, when the entity was targeted by the skill.
As the variant with flags is potentially much cleaner and performant I suggest implementing native support for it in msu.
Describe the solution you'd like
Implement an framework into skill.nut consisting of the following two functions
// Write the current round number in a tactical manager flag that consists of the id of an entity and the id of this skill
function markEntityWithRound( _entity )
{
::Tactical.Entities.getFlags().set(_targetEntity.getID() + this.getID() + "MarkedWithRoundNumber", ::Time.getRound());
}
// Return the round number imprinted into a tactical manager flag for that entity; Returns 0 if no flag exists yet for it
function getRoundOfMarkedEntity( _entity )
{
if (::Tactical.Entities.getFlags().has(_targetEntity.getID() + this.getID() + "MarkedWithRoundNumber"))
{
return ::Tactical.Entities.getFlags().get(_targetEntity.getID() + this.getID() + "MarkedWithRoundNumber");
}
return 0;
}
The text was updated successfully, but these errors were encountered:
Is your feature request related to a problem? Please describe.
Some skills can only be used once per turn or round on the same entity. Turn and Round is so closely related that they can often just conbined to
once per round
.If we want to track whether we already used a skill on an entity we can do either of two things:
As the variant with flags is potentially much cleaner and performant I suggest implementing native support for it in msu.
Describe the solution you'd like
Implement an framework into skill.nut consisting of the following two functions
The text was updated successfully, but these errors were encountered: