steven4547466 / AdvancedSubclassing

Adds very advanced subclassing to SCP: SL
Other
5 stars 6 forks source link

CantHeal not working completly #15

Closed coco9515 closed 4 years ago

coco9515 commented 4 years ago

Describe the bug CantHeal properly block the heal from the Adrenaline and also the overtime heal from the Painkills but not the instant heal from the Painkillers and the Medkit.

To Reproduce Steps to reproduce the behavior:

  1. Create a class with CantHeal
  2. Spawn the class, hurt yourself and use a medkit / painkillers to heal back.

Expected behavior Should not heal in anyway.

Screenshots N/A

Config File

# Name of the Class
name: NTF UTR

# Which roles can have this class
affects_roles:
- NtfCadet

string_options:
  # The message the user sees when they get the class.
  GotClassMessage: Tu es un <color=cyan>UTR</color>. Tu DOIS respecter à la lettre le réglement de la fondation et n'obéir qu'aux lieutenants et commandants.
  # The message players see when they attempt to use an ability that's on cooldown.
  AbilityCooldownMessage: Ta capacité {ability} est en rechargement pour {seconds} secondes !
  # A badge for the player.
  Badge: UTR
  # The color of the badge.
  BadgeColor: cyan
  # A message that will be announced by CASSIE when this subclass spawns.
  CassieMessage: 
  # The message people see when they run out of ability uses for any ability.
  OutOfAbilityUses: Tu n'as plus la capacité d'utiliser {ability} !

boolean_options:
  # Enables the class.
  Enabled: true
  # Disregards the value beneath it and uses the server default for friendly fire.
  DisregardHasFF: true
  # Enables friendly fire for this subclass, useful for traitorous subclasses, when a player with this option shoots a person on their team, everyone may shoot them regardless of DisregardTakesFF and TakesFriendlyFire.
  HasFriendlyFire: true
  # Disregards the value beneath it and uses the server default for friendly fire.
  DisregardTakesFF: true
  # Whether players on the same team of this subclass may shoot the player and may not be shot back.
  TakesFriendlyFire: true
  # If set to true, the subclass can only be given to a spawn wave. Defaults to false.
  OnlyAffectsSpawnWave: false
  # If set to true, the subclass can be given to both individuals and spawn waves. Defaults to false.
  AffectsSpawnWave: true
  # If set to false, the subclass will not be given to players after escaping. Defaults to true.
  GivenOnEscape: false

integer_options:
  # Max health of the class.
  MaxHealth: 500
  # The health the class spawns with.
  HealthOnSpawn: 500
  # Armor is a value that decreases over the course of the game, unless given the ability that stops it from doing so.
  # The max amount of armor the class has.
  MaxArmor: -1
  # The armor the class has on spawn.
  ArmorOnSpawn: -1
  # The max number of people that can have this class at any given moment - disregarding spawn waves.
  MaxAlive : 1
  # The max number of times this class can spawn per round. If this class is affecting a spawn wave, it is counted as 1. Defaults to an no max.
  MaxSpawnPerRound : 2
  # Any integer values from abilities go here as the <Ability>MaxUses

float_options:
  # The chance to get this class, not calculated with other classes for the same role.
  ChanceToGet: 5
  # The player's model scale across the selected axis.
  ScaleX : 1.1
  ScaleY : 1.1
  ScaleZ : 1.1
  # The player's spawn offset relative to the selected axis.
  SpawnOffsetX : 0
  SpawnOffsetY : 0
  SpawnOffsetZ : 0
  # The damage multiplier this player has. A value of 2 will double their damage.
  OnHitDamageMultiplier : 1
  # There's the OnSpawn<EFFECT_NAME>Chance which is the chance for the effect to be applied, this is the required field.
  # And there's OnSpawn<EFFECT_NAME>Duration this is optional and is the duration of the effect.
  OnSpawnExhaustedChance: 100
  OnSpawnPanicChance: 100
  OnSpawnHemorrhageChance: 100

# You may have a list of RoomTypes where this class is teleported to at the start of the round. Use Unknown for the default spawn location.
spawn_locations:
- Unknown

# "None" instead of any object means nothing would be added, but it still clears the player's inventory.
# It may be empty, if that's the case the value is "spawn_items: {}" then it would spawn with the default items from the role.
spawn_items:
  0:
    KeycardNTFLieutenant: 100
  1:
    GunE11SR: 100
  2:
    Radio: 100
  3:
    Flashlight: 100
  4:
    GrenadeFrag: 20
  5:
    GunUSP: 100

# You can edit the default values of how must ammo a player has. Use -1 for default.
spawn_ammo:
  Nato556: 240
  Nato762: 70
  Nato9: 200

# Not all abilities are good, but they all add new things to the game.
# It may be empty, if that's the case, the value should be "abilities: []".
abilities:
- Disable096Trigger
- CantBeSacraficed
- CantHeal

# You can set custom cooldowns for abilities that have cooldowns.
# This list should contain all abilites that could have cooldowns that the class has, even if you set them to 0.
# It may be empty, if that's the case, the value should be "ability_cooldowns: {}".
ability_cooldowns: {}

# With this list, you can give a subclass a list of other subclasses they can friendly fire upon.
# This value is a list of strings (which are other subclass names). It may be empty, if that's the case, the value should be "advanced_ff_rules: []".
advanced_ff_rules: []

# This is a list of roles that are unable to damage the subclass regardless of team.
# If you want it to be empty, you can use "roles_that_cant_damage: []".
roles_that_cant_damage:
- Scp049
- Scp106

# This is the Team that players with this class can end the game with. "RIP" means the default team.
ends_round_with: RIP

# This adds the ability to give players with certain subclasses the ability to inflict any effects upon damage a player.
# If there is anything in the list, you have to add those to the float_options : "OnHit<EFFECT_NAME>Chance" which is the chance for the effect to be applied.
# And there's "OnHit<EFFECT_NAME>Duration" this is optional and is the duration of the effect.
on_hit_effects: []

# This adds the ability to give players with certain subclasses any effects on spawn.
# If there is anything in the list, you have to add those to the float_options : "OnSpawn<EFFECT_NAME>Chance" which is the chance for the effect to be applied.
# And there's "OnSpawn<EFFECT_NAME>Duration" this is optional and is the duration of the effect.
on_spawn_effects:
- Hemorrhage
- Exhausted
- Panic

# This adds the ability to give players with certain subclasses any effects when they are damaged based on the damage type.
# If there is anything in the list, you have to add those to the float_options : "OnDamaged<EFFECT_NAME>Chance" which is the chance for the effect to be applied.
# And there's "OnDamaged<EFFECT_NAME>Duration" this is optional and is the duration of the effect.
#on_damaged_effects:

# It defines what role the class will spawn as. "None" is the default meaning they spawn as the role they were going to.
spawns_as: NtfLieutenant

# These define what role the class becomes upon escaping. There are options for cuffed and not cuffed.
# If this is set to "None", or is not provided, it will use the default. This does not work on classes that cannot escape.
escapes_as:
  cuffed: None
  not_cuffed: None

Console Logs N/A

Versioning

Additional context That gave me the idea of blocking the AHP from the Adrenaline, maybe by another ability, to let people have the choice ?

steven4547466 commented 4 years ago

This was a simple mistake that should be fixed here