Example #1
0
        public HeartAttackSickness() : base(ID, SicknessType.Ailment, Severity.Critical, 0.00025f, new List <InfectionVector> {
            InfectionVector.Exposure
        }, DISEASE.DURATION.NORMAL)
        {
            fatalityDuration = 0.5f * Constants.SECONDS_PER_CYCLE;

            // понижение атрибутов
            LocString name = STRINGS.DUPLICANTS.DISEASES.HEARTATTACKSICKNESS.NAME;

            AddSicknessComponent(new AttributeModifierSickness(new AttributeModifier[]
            {
                new AttributeModifier(Db.Get().Attributes.Athletics.Id, ATTRIBUTE_PENALTY, name, false, false, true),
                new AttributeModifier(Db.Get().Attributes.Strength.Id, ATTRIBUTE_PENALTY, name, false, false, true),
                new AttributeModifier(Db.Get().Attributes.Digging.Id, ATTRIBUTE_PENALTY, name, false, false, true),
                new AttributeModifier(Db.Get().Attributes.Construction.Id, ATTRIBUTE_PENALTY, name, false, false, true),
                new AttributeModifier(Db.Get().Attributes.Art.Id, ATTRIBUTE_PENALTY, name, false, false, true),
                new AttributeModifier(Db.Get().Attributes.Caring.Id, ATTRIBUTE_PENALTY, name, false, false, true),
                new AttributeModifier(Db.Get().Attributes.Learning.Id, ATTRIBUTE_PENALTY, name, false, false, true),
                new AttributeModifier(Db.Get().Attributes.Machinery.Id, ATTRIBUTE_PENALTY, name, false, false, true),
                new AttributeModifier(Db.Get().Attributes.Cooking.Id, ATTRIBUTE_PENALTY, name, false, false, true),
                new AttributeModifier(Db.Get().Attributes.Botanist.Id, ATTRIBUTE_PENALTY, name, false, false, true),
                new AttributeModifier(Db.Get().Attributes.Ranching.Id, ATTRIBUTE_PENALTY, name, false, false, true),
                new AttributeModifier(Db.Get().Amounts.Stamina.deltaAttribute.Id, ModifierSet.ConvertValue(-100, Units.PerDay), name, false, false, true)
            }));

            // для дополнительного описания симптомов
            AddSicknessComponent(new HeartAttackComponent());

            // анимация :
            AddSicknessComponent(new CommonSickEffectSickness());
            //AddSicknessComponent(new CustomSickEffectSickness("spore_fx_kanim", "working_loop"));

            AddSicknessComponent(new AnimatedSickness(new HashedString[]
            {
                "anim_idle_cold_kanim",
                "anim_loco_run_cold_kanim",
                "anim_loco_walk_cold_kanim"
            }, Db.Get().Expressions.SickCold));

            AddSicknessComponent(new PeriodicEmoteSickness("anim_idle_cold_kanim", new HashedString[]
            {
                "idle_pre",
                "idle_default",
                "idle_pst"
            }, BUILDINGS.WORK_TIME_SECONDS.SHORT_WORK_TIME));
        }
Example #2
0
            private static void Postfix(ModifierSet __instance)
            {
                // добавим снижение аморали для траура
                Effect effectMourning = __instance.effects.Get(MOURNING);

                effectMourning.Add(new AttributeModifier("QualityOfLife", -20, MOURNING, false));

                //TODO: ДЛЯ ТЕСТИРОВАНИЯ. ПОТОМ УБРАТЬ !!!
                effectMourning.duration = 90;

                //TODO: отбалансить и настроить эффекты и сроки

                //TODO: небольшой компенсационный бафф за похороны
                Effect effectFuneral = new Effect(
                    id: FUNERAL,
                    name: STRINGS.DUPLICANTS.MODIFIERS.FUNERAL.NAME,
                    description: STRINGS.DUPLICANTS.MODIFIERS.FUNERAL.TOOLTIP,
                    duration: effectMourning.duration,
                    show_in_ui: true,
                    trigger_floating_text: true,
                    is_bad: false);

                effectFuneral.Add(new AttributeModifier("StressDelta", ModifierSet.ConvertValue(-10, Units.PerDay), effectFuneral.Name, false));
                effectFuneral.Add(new AttributeModifier("QualityOfLife", +10, effectFuneral.Name, false));
                __instance.effects.Add(effectFuneral);

                //TODO: экзистенциальная меланхолия
                Effect effectMelancholy = new Effect(
                    id: MELANCHOLY,
                    name: STRINGS.DUPLICANTS.MODIFIERS.MELANCHOLY.NAME,
                    description: STRINGS.DUPLICANTS.MODIFIERS.MELANCHOLY.TOOLTIP,
                    duration: 0,
                    show_in_ui: true,
                    trigger_floating_text: true,
                    is_bad: true);

                effectMelancholy.Add(new AttributeModifier("StressDelta", ModifierSet.ConvertValue(+20, Units.PerDay), effectMelancholy.Name, false));
                effectMelancholy.Add(new AttributeModifier("QualityOfLife", -5, effectMelancholy.Name, false));
                __instance.effects.Add(effectMelancholy);

                Effect effectMelancholy_tracking = new Effect(MELANCHOLY_TRACKING, "", "", effectMourning.duration, false, false, false);

                __instance.effects.Add(effectMelancholy_tracking);

                //TODO: дебаф за незакопанные трупы
                Effect effectUnburiedCorpse = new Effect(
                    id: UNBURIED_CORPSE,
                    name: STRINGS.DUPLICANTS.MODIFIERS.UNBURIED_CORPSE.NAME,
                    description: STRINGS.DUPLICANTS.MODIFIERS.UNBURIED_CORPSE.TOOLTIP,
                    duration: 0,
                    show_in_ui: true,
                    trigger_floating_text: true,
                    is_bad: true);

                effectUnburiedCorpse.Add(new AttributeModifier("StressDelta", ModifierSet.ConvertValue(+20, Units.PerDay), effectUnburiedCorpse.Name, false));
                effectUnburiedCorpse.Add(new AttributeModifier("QualityOfLife", -10, effectUnburiedCorpse.Name, false));
                __instance.effects.Add(effectUnburiedCorpse);

                //TODO: дебафы за вид свежего и подгнившего трупа
                Effect effectObservedCorpse = new Effect(
                    id: OBSERVED_CORPSE,
                    name: STRINGS.DUPLICANTS.MODIFIERS.OBSERVED_CORPSE.NAME,
                    description: STRINGS.DUPLICANTS.MODIFIERS.OBSERVED_CORPSE.TOOLTIP,
                    duration: 30,
                    show_in_ui: true,
                    trigger_floating_text: true,
                    is_bad: true);

                effectObservedCorpse.Add(new AttributeModifier("StressDelta", ModifierSet.ConvertValue(+10, Units.PerDay), effectObservedCorpse.Name, false));
                effectObservedCorpse.Add(new AttributeModifier("QualityOfLife", -5, effectObservedCorpse.Name, false));
                __instance.effects.Add(effectObservedCorpse);

                Effect effectObservedRottenCorpse = new Effect(
                    id: OBSERVED_ROTTEN_CORPSE,
                    name: STRINGS.DUPLICANTS.MODIFIERS.OBSERVED_ROTTEN_CORPSE.NAME,
                    description: STRINGS.DUPLICANTS.MODIFIERS.OBSERVED_ROTTEN_CORPSE.TOOLTIP,
                    duration: 30,
                    show_in_ui: true,
                    trigger_floating_text: true,
                    is_bad: true);

                effectObservedRottenCorpse.Add(new AttributeModifier("StressDelta", ModifierSet.ConvertValue(+30, Units.PerDay), effectObservedRottenCorpse.Name, false));
                effectObservedRottenCorpse.Add(new AttributeModifier("QualityOfLife", -15, effectObservedRottenCorpse.Name, false));
                __instance.effects.Add(effectObservedRottenCorpse);

                //TODO: дебаф при полном уничтожении трупа
                Effect effectDestroyedCorpse = new Effect(
                    id: DESTROYED_CORPSE,
                    name: STRINGS.DUPLICANTS.MODIFIERS.DESTROYED_CORPSE.NAME,
                    description: STRINGS.DUPLICANTS.MODIFIERS.DESTROYED_CORPSE.TOOLTIP,
                    duration: 60,
                    show_in_ui: true,
                    trigger_floating_text: true,
                    is_bad: true);

                effectDestroyedCorpse.Add(new AttributeModifier("StressDelta", ModifierSet.ConvertValue(+40, Units.PerDay), effectDestroyedCorpse.Name, false));
                effectDestroyedCorpse.Add(new AttributeModifier("QualityOfLife", -20, effectDestroyedCorpse.Name, false));
                __instance.effects.Add(effectDestroyedCorpse);

                //TODO: дебаф за осквернение могилы
                Effect effectGraveDesecration = new Effect(
                    id: GRAVE_DESECRATION,
                    name: STRINGS.DUPLICANTS.MODIFIERS.GRAVE_DESECRATION.NAME,
                    description: STRINGS.DUPLICANTS.MODIFIERS.GRAVE_DESECRATION.TOOLTIP,
                    duration: 60,
                    show_in_ui: true,
                    trigger_floating_text: true,
                    is_bad: true);

                effectGraveDesecration.Add(new AttributeModifier("StressDelta", ModifierSet.ConvertValue(+30, Units.PerDay), effectGraveDesecration.Name, false));
                effectGraveDesecration.Add(new AttributeModifier("QualityOfLife", -10, effectGraveDesecration.Name, false));
                __instance.effects.Add(effectGraveDesecration);
            }