FF2-Official icon indicating copy to clipboard operation
FF2-Official copied to clipboard

FF2_SetBossSpecial for v2

Open shadow93 opened this issue 9 years ago • 0 comments

Since we have FF2_GetBossSpecial, why not FF2_SetBossSpecial? Could work for bosses that in one of their abilities, use a different name while that form is active, than in their normal form.

A notorious example is the Hyperdimension Neptunia CPUs, which both have a "human" (e.g. Neptune) and a "hdd" form (e.g. Purple Heart).

Or for example, Anakin Skywalker / Darth Vader.

Or the Hulk, and his normal form.

would work like this:

native bool:FF2_SetBossSpecial(boss=0, String:name[], clientMeaning=0);
public bool:SetBossSpecial(boss, String:bossName[], clientMeaning)
{
    if(clientMeaning)  //characters.cfg
    {
        if(boss<0 || !BossKV[boss])
        {
            return false;
        }
        KvRewind(BossKV[boss]);
        KvSetString(BossKV[boss], "name", bossName);
    }
    else  //Special[] array
    {
        if(boss<0 || Special[boss]<0 || !BossKV[Special[boss]])
        {
            return false;
        }
        KvRewind(BossKV[Special[boss]]);
        KvSetString(BossKV[Special[boss]], "name", bossName);
    }
    return true;
}

public Native_SetBossSpecial(Handle:plugin, numParams)
{
    decl String:bossName[512];
    GetNativeString(2, bossName, 512);
    new bool:bossExists=SetBossSpecial(GetNativeCell(1), bossName, GetNativeCell(3));
    return bossExists;
}

shadow93 avatar Jan 24 '16 19:01 shadow93