Phobos
Phobos copied to clipboard
Block damage system
- You can now make techno have a chance to block the incoming damage, which will make it multiply by a set percentage.
CanBlock, if set to false, make this TechnoType can't trigger a block, even if the block settings are from warheads, or affected by attached effects with block chance modifiers.
Block.Chancesdetermines chance for a block to occur. Value from position matching the position fromBlock.AffectBelowPercentsis used if found, or 0.0 if not found.Block.DamageMultipliersdetermines the multiplier of received damage. Value from position matching the position fromBlock.AffectBelowPercentsis used if found, or 1.0 if not found.Block.AffectBelowPercents, if set to a single value, determines minimum percentage of their maximumStrengththat targets must have left to be affected by a critical hit. If set to a list of values, it'll further determineBlock.ChancesandBlock.DamageMultiplierswhen target health is below the certain percentage listed here.Block.AffectsHousescan be used to customize houses that damage from this firer can be blocked. Notice that not all damage has a firer, such as damage dealt by anims.- Following conditions determine whether a block can be triggered.
Block.CanActive.NoFirerdetermines if the block can be triggered when the damage has no firer.Block.CanActive.Powereddetermines if the block can be triggered when the techno is deactivated (PoweredUnitor affected by EMP) or on low power.Block.CanActive.ShieldActivedetermines if the block can be triggered when the techno has an active shield. If you only want it to be triggered by certain type of shield, you can further setCanBlockfor them.Block.CanActive.ShieldInactivedetermines if the block can be triggered when the techno doesn't have an active shield.Block.CanActive.ZeroDamageandBlock.CanActive.NegativeDamagedetermine if the block can be triggered when the damage is equal to or below 0. determines if the block can be triggered when the damage is below 0, respectively.Block.CanActive.MoveandBlock.CanActive.Stationarydetermines the block can be triggered when the techno is moving or not, respectively.
Block.Flash, if set to true, makes it so that a light flash is generated when a block is triggered. Size of the flash is determined by damage dealt (based on original damage instead of the blocked one), unlessBlock.Flash.FixedSizeis set to a number, in which case that value is used instead (range of values that produces visible effect are increments of 4 from 81 to 252, anything higher or below does not have effect). Color can be customized viaBlock.Flash.Red/Green/Blue. IfBlock.Flash.Blackis set to true, the generated flash will be black regardless of other color settings.Block.Animscan be used to set animation to be displayed if a block is triggered. If more than one animation is listed, a random one is selected.Block.Weapon, if set, will be fired at the techno once a block is triggered.Block.ReflectDamagecan be set to true to have positive damage dealt to the object to be reflected back to the attacker, if a block is triggered and there is a firer of the damage.Block.ReflectDamage.Warheaddetermines which Warhead is used to deal the damage, defaults to[CombatDamage]->C4Warhead. IfBlock.ReflectDamage.Warhead.Detonateis set to true, the Warhead is fully detonated instead of used to simply deal damage.Block.ReflectDamage.Chancedetermines the chance of reflection. -Block.ReflectDamage.AffectsHousescustomizes which houses can trigger the reflect damage, default toBlock.AffectsHouses.Block.ReflectDamage.Multiplieris a multiplier to the damage received and then reflected back (based on original damage instead of the blocked one), whileBlock.ReflectDamage.Overridedirectly overrides the damage. Already reflected damage cannot be further reflected back.- Warheads can prevent reflect damage from occuring by setting
SuppressReflectDamageto true.
- Warheads can prevent reflect damage from occuring by setting
==================================================================================
- Warheads can also use the above settings to determine their own block behaviors when hitting the target.
- Despite all block settings can be overridden, if you want to override
Block.ChancesorBlock.DamageMultipliers, it's recommended to overrideBlock.AffectBelowPercentsin the meantime since they're lists with values in correpsonding positions.
- Despite all block settings can be overridden, if you want to override
Block.BasedOnWarhead, if set to true, makes the warhead block settings as a base when calculating a block. If set to false, block settings on techno is used as a base.Block.AllowOverride, if set to true, allows the block settings from techno or warhead to override the other, if set. IfBlock.BasedOnWarheadis set to true, then it'll uses the set values from techno to override warheads', while keeping the unset values as the same. If it's set to false, then it'll do the override from warhead to techno with the same rule.Block.IgnoreAttachEffectcan be set on WarheadTypes to make their attack ignore modifiers ofBlock.ChancesandBlock.DamageMultipliersfrom the attached effects on the techno.Block.ChanceMultiplierandBlock.ExtraChancecan be set on WarheadTypes to multiply the block chance or grant a fixed bonus to it when these warheads hit their targets, respectively.ImmuneToBlockcan be set on WarheadTypes to make them can't trigger a block.
==================================================================================
- Attached effects'
Block.ChanceMultiplierandBlock.ExtraChancecan be used to multiply the block chance or grant a fixed bonus to it for the object the effect is attached to, respectively.
In rulesmd.ini:
[SOMETECHNO] ; TechnoType
CanBlock=true ; boolean
Block.Chances= ; list of floating-point values (percentage or absolute) (0.0-1.0)
Block.DamageMultipliers= ; list of floating-point values (percentage or absolute)
Block.AffectBelowPercents= ; list of floating-point values (percentage or absolute) (0.0-1.0)
Block.AffectsHouses=all ; list of Affected House Enumeration (none|owner/self|allies/ally|team|enemies/enemy|all)
Block.CanActive.NoFirer=true ; boolean
Block.CanActive.Powered=false ; boolean
Block.CanActive.ShieldActive=true ; boolean
Block.CanActive.ShieldInactive=true ; boolean
Block.CanActive.ZeroDamage=false ; boolean
Block.CanActive.NegativeDamage=false ; boolean
Block.CanActive.Move=true ; boolean
Block.CanActive.Stationary=true ; boolean
Block.Flash=false ; boolean
Block.Flash.FixedSize= ; integer
Block.Flash.Red=true ; boolean
Block.Flash.Green=true ; boolean
Block.Flash.Blue=true ; boolean
Block.Flash.Black=false ; boolean
Block.Anims= ; list of animations
Block.Weapon= ; WeaponType
Block.ReflectDamage=false ; boolean
Block.ReflectDamage.Chance=1.0 ; floating point value
Block.ReflectDamage.Warhead= ; WarheadType
Block.ReflectDamage.Warhead.Detonate=false ; WarheadType
Block.ReflectDamage.Multiplier=1.0 ; floating point value, percents or absolute
Block.ReflectDamage.AffectsHouses= ; list of Affected House Enumeration (none|owner/self|allies/ally|team|enemies/enemy|all)
Block.ReflectDamage.Override= ; integer
[SOMEWARHEAD] ; WarheadType
Block.Chances= ; list of floating-point values (percentage or absolute) (0.0-1.0)
Block.DamageMultipliers= ; list of floating-point values (percentage or absolute)
Block.AffectBelowPercents= ; list of floating-point values (percentage or absolute) (0.0-1.0)
Block.AffectsHouses=all ; list of Affected House Enumeration (none|owner/self|allies/ally|team|enemies/enemy|all)
Block.CanActive.NoFirer=true ; boolean
Block.CanActive.Powered=false ; boolean
Block.CanActive.ShieldActive=true ; boolean
Block.CanActive.ShieldInactive=true ; boolean
Block.CanActive.ZeroDamage=false ; boolean
Block.CanActive.NegativeDamage=false ; boolean
Block.CanActive.Move=true ; boolean
Block.CanActive.Stationary=true ; boolean
Block.Flash=false ; boolean
Block.Flash.FixedSize= ; integer
Block.Flash.Red=true ; boolean
Block.Flash.Green=true ; boolean
Block.Flash.Blue=true ; boolean
Block.Flash.Black=false ; boolean
Block.Anims= ; list of animations
Block.Weapon= ; WeaponType
Block.ReflectDamage=false ; boolean
Block.ReflectDamage.Chance=1.0 ; floating point value
Block.ReflectDamage.Warhead= ; WarheadType
Block.ReflectDamage.Warhead.Detonate=false ; WarheadType
Block.ReflectDamage.Multiplier=1.0 ; floating point value, percents or absolute
Block.ReflectDamage.AffectsHouses= ; list of Affected House Enumeration (none|owner/self|allies/ally|team|enemies/enemy|all)
Block.ReflectDamage.Override= ; integer
Block.BasedOnWarhead=false ; boolean
Block.AllowOverride=true ; boolean
Block.IgnoreAttachEffect=true ; boolean
Block.ChanceMultiplier=1.0 ; floating point value
Block.ExtraChance=0.0 ; floating point value
ImmuneToBlock=false ; boolean
[SOMEATTACHEFFECT] ; AttachEffectType
Block.ChanceMultiplier=1.0 ; floating point value
Block.ExtraChance=0.0 ; floating point value
[SOMESHIELDTYPE] ; ShieldType name
CanBlock=true ; boolean
Nightly build for this pull request:
- compiled-dll-de25aeb48aecad0840c7936f1a40972db6a89505.zip These artifacts will expire in 90 days and will not be available for download after that time.
This comment is automatic and is meant to allow guests to get latest nightly builds for this pull request without registering. It is updated on every successful build.
Due to the introduction of a new class, it has been upgraded to T2.