diff --git a/1.6/1.6/Assemblies/WulaFallenEmpire.dll b/1.6/1.6/Assemblies/WulaFallenEmpire.dll index 4c9b51c4..d2488a0b 100644 Binary files a/1.6/1.6/Assemblies/WulaFallenEmpire.dll and b/1.6/1.6/Assemblies/WulaFallenEmpire.dll differ diff --git a/1.6/1.6/Defs/AbilityDefs/WULA_Flyover_Ability.xml b/1.6/1.6/Defs/AbilityDefs/WULA_Flyover_Ability.xml index 4233a8cc..a13bd638 100644 --- a/1.6/1.6/Defs/AbilityDefs/WULA_Flyover_Ability.xml +++ b/1.6/1.6/Defs/AbilityDefs/WULA_Flyover_Ability.xml @@ -220,7 +220,7 @@ WULA_Spawn_BattleShip_Artillery - 申请沿指定航道发起全域封锁,一整只乌拉帝国舰队将在大量战机编队的掩护下沿着航道行进,并使用所有的可用武器进行轰炸,以彻底粉碎一切抵抗。 + 申请沿指定航道发起全域封锁,一整只乌拉帝国舰队将在大量战机编队的掩护下沿着航道行进,并使用舰炮进行轰炸,以彻底粉碎一切抵抗。\n\n轰炸的范围几乎覆盖整张地图,炮击会尽可能避免击中殖民地的人员和资产,但是巨大的轰炸范围使得底下的一切都难逃厄运——尽可能不要在自己的殖民地上空呼叫。 Wula/UI/Abilities/WULA_Spawn_Fighter_Drone_Laser 1 Misc12 @@ -238,18 +238,18 @@ - - +
  • WULA_MotherShip_Planet_Interdiction GroundStrafing - 0.005 + 0.02 20 true Perpendicular diff --git a/1.6/1.6/Defs/EventDefs/EventDef_Wula/Wula_MainEvent.xml b/1.6/1.6/Defs/EventDefs/EventDef_Wula/Wula_MainEvent.xml index deabc91d..3172b084 100644 --- a/1.6/1.6/Defs/EventDefs/EventDef_Wula/Wula_MainEvent.xml +++ b/1.6/1.6/Defs/EventDefs/EventDef_Wula/Wula_MainEvent.xml @@ -45,6 +45,24 @@
  • +
  • + + true + (255,255,255,255) + (157,201,185,195) + (255,255,255,255) + (255,255,255,255) + +
  • + +
  • + Wula_UI_Legion_30 +
  • +
  • + +
  • + +
  • true @@ -62,6 +80,344 @@
  • + + Wula_UI_Legion_30 + + Wula/Events/Portraits/WULA_Legion_5 + 「军团」,P.I.A + +
  • 好的好的,那么,你们需要什么?
  • +
  • 嗯嗯,你们遇到什么麻烦了?
  • +
  • 希望你们没给我捅什么大篓子。
  • +
    + +
  • + +
  • + Wula_Has_Receive_Silver_From_PIA + 0 + Int +
  • +
  • + Wula_Has_Receive_MechWula_From_PIA + 0 + Int +
  • +
  • + Wula_Has_Receive_Reinforcement_From_PIA + 0 + Int +
  • + + +
  • + Wula_Goodwill_To_PIA +
  • +
  • + Wula_PIA_Legion_Faction + Wula_Goodwill_To_PIA +
  • + + +
    + +
  • + + 应急资金,我好像已经发给你们了? + false + +
  • + Wula_Has_Receive_Silver_From_PIA + 0 +
  • + + +
  • + +
  • + Wula_UI_Legion_31 +
  • +
  • + +
  • +
    + +
  • + + 你们不会自己去造吗? + false + +
  • + Wula_Has_Receive_MechWula_From_PIA + 0 +
  • + + +
  • + +
  • + Wula_UI_Anisia_32 +
  • +
  • + +
  • +
    + +
  • + + 我们的特遣队都在忙,请稍后再试——好吧我骗你们的,你们就不能自己搞两杆枪吗? + false + +
  • + Wula_Has_Receive_Reinforcement_From_PIA + 0 +
  • + + +
  • + +
  • + Wula_UI_Anisia_33 +
  • +
  • + +
  • +
    + +
  • + + true + (255,255,255,255) + (157,201,185,195) + (255,255,255,255) + (255,255,255,255) + +
  • + +
  • + Wula_UI_Legion_1 +
  • +
  • + +
  • + + +
    +
    + + Wula_UI_Legion_31 + + Wula/Events/Portraits/WULA_Legion_5 + 「军团」,P.I.A + +
  • 原来是来要钱的嘛···我可以给你们调拨一轮紧急资金,但是这是有限的,并且仅能作殖民地发展之用。\n\n话说回来,你们真的缺钱吗,我怎么有点不信?
  • +
    + +
  • + + +
  • + Wula_Goodwill_To_PIA +
  • +
  • + Wula_PIA_Legion_Faction + Wula_Goodwill_To_PIA +
  • + + +
    + +
  • + + 殖民地的表现让P.I.A相当不满意,不会为殖民地派出任何额外增援 + false + +
  • + Wula_Goodwill_To_PIA + -75 +
  • + + +
  • + +
  • + Silver + 3000 +
  • +
  • + Wula_Has_Receive_Silver_From_PIA + 1 + Add +
  • +
  • + P.I.A的紧急资金已经空投(3000银) + PositiveEvent +
  • +
  • + +
  • +
    + +
  • + + +
  • + +
  • + Wula_UI_Legion_1 +
  • +
  • + +
  • + + +
    +
    + + Wula_UI_Anisia_32 + + Wula/Events/Portraits/WULA_Legion_2 + 「军团」,P.I.A + +
  • 唔,现在我手上确实有一台乌拉帝国合成人还没有分配殖民地,你们需要的话可以划拨给你们。但是下次你们得记得自己造——造合成人的材料是要花项目资金的。
  • +
    + +
  • + + +
  • + Wula_Goodwill_To_PIA +
  • +
  • + Wula_PIA_Legion_Faction + Wula_Goodwill_To_PIA +
  • + + +
    + +
  • + + 殖民地的表现让P.I.A相当不满意,不会为殖民地派出任何额外增援 + false + +
  • + Wula_Goodwill_To_PIA + -75 +
  • + + +
  • + +
  • + Wula_PawnKind + 1 + true + 机械乌拉加入殖民地 + 一台乌拉帝国合成人受命加入了殖民地。 +
  • +
  • + Wula_Has_Receive_MechWula_From_PIA + 1 + Add +
  • +
  • + +
  • +
    + +
  • + + +
  • + +
  • + Wula_UI_Legion_1 +
  • +
  • + +
  • + + +
    +
    + + Wula_UI_Anisia_33 + + Wula/Events/Portraits/WULA_Legion_1 + 「军团」,P.I.A + +
  • 遇到麻烦了?我可以把手上的特遣队丢下去,你们记得找好掩体。
  • +
    + +
  • + + +
  • + Wula_Goodwill_To_PIA +
  • +
  • + Wula_PIA_Legion_Faction + Wula_Goodwill_To_PIA +
  • + + +
    + +
  • + + 殖民地的表现让P.I.A相当不满意,不会为殖民地派出任何额外增援 + false + +
  • + Wula_Goodwill_To_PIA + -75 +
  • + + +
  • + +
  • + Wula_Has_Receive_Reinforcement_From_PIA + 1 + Add +
  • +
  • + 6000 + Wula_PIA_Legion_Faction + ImmediateAttackFriendly + EdgeDropGroups + Combat + +
  • + Combat + 100 + + 1 + +
  • + + +
  • + +
  • +
    + +
  • + + +
  • + +
  • + Wula_UI_Legion_1 +
  • +
  • + +
  • + + +
    +
    diff --git a/1.6/1.6/Defs/FactionDefs/Factions_Player_WULA.xml b/1.6/1.6/Defs/FactionDefs/Factions_Player_WULA.xml index 011fa1a8..805a983a 100644 --- a/1.6/1.6/Defs/FactionDefs/Factions_Player_WULA.xml +++ b/1.6/1.6/Defs/FactionDefs/Factions_Player_WULA.xml @@ -78,7 +78,7 @@ false Ultra 999999 - true + false true @@ -94,7 +94,7 @@ Combat 30 - 10 + 10 diff --git a/1.6/1.6/Defs/HediffDefs/Hediffs_BodyParts_Turret.xml b/1.6/1.6/Defs/HediffDefs/Hediffs_BodyParts_Turret.xml deleted file mode 100644 index d19940db..00000000 --- a/1.6/1.6/Defs/HediffDefs/Hediffs_BodyParts_Turret.xml +++ /dev/null @@ -1,11 +0,0 @@ - - - - - - diff --git a/1.6/1.6/Defs/HediffDefs/Hediffs_BodyParts_WULA.xml b/1.6/1.6/Defs/HediffDefs/Hediffs_BodyParts_WULA.xml index 6d120983..724a41ed 100644 --- a/1.6/1.6/Defs/HediffDefs/Hediffs_BodyParts_WULA.xml +++ b/1.6/1.6/Defs/HediffDefs/Hediffs_BodyParts_WULA.xml @@ -1318,66 +1318,6 @@ - - - WULA_Extract_Soul_Wedge_Hediff - HediffWithComps - - 该生物的灵魂被人为的分离了。 - 该生物的灵魂被人为的分离了,在这种状态下,目标不稳定的灵魂每过一段时间都可能导致目标无法行动、陷入昏迷甚至是直接死亡——这种症状没有固定的治愈时间,但是每天都将有一定几率自动消失,届时可再次开展提取手术。 - - 0.01 - 1 - true - true - true - true - Brain - -
  • - 60000 - 0.5 -
  • -
  • - 60000 - {PAWN_labelShort} 的灵魂状态从 {1} 转变为 {2}. -
  • -
  • - - -
  • - - 0.01 - -
  • - Consciousness - 0.5 -
  • - - -
  • - - 0.3 - -
  • - Consciousness - 0.1 -
  • - - -
  • - - 0.9 - -
  • - Consciousness - 0 -
  • - - - -
    - WULA_Shutdown_Synth @@ -1466,4 +1406,66 @@ + + + + WULA_AutoJumpdrive_Hediff + + 安装在乌拉帝国合成人军团体内的微型跃迁引擎,会在合成人到达指定作战时间或死亡时将其回收 + HediffWithComps + (1,0,0.5) + 1.0 + 0.0 + true + WULA_AutoJumpdrive + +
  • + AcidCloud + 6 + 0.25~0.75 + Filth_Slime + DeathAcidifier + ChemicalBurn + 3~6 +
  • +
  • + 10000 +
  • +
  • + 15000 + true + PsycastAreaEffect + 2.5 + false + true + true + {0} 通过传送离开了殖民地 +
  • +
    + +
  • + + 0 +
  • +
    +
    + + WULA_AutoJumpdrive + + 安装在乌拉帝国合成人军团体内的微型跃迁引擎,会在合成人到达指定作战时间或死亡时将其回收。 + + 0.3 + 1 + + +
  • WULA_AutoJumpdrive
  • +
    + + 1 + + + Recipe_Smith + + +
    diff --git a/1.6/1.6/Defs/PawnKinds/PawnKinds_Wula.xml b/1.6/1.6/Defs/PawnKinds/PawnKinds_Wula.xml index 0a1892ee..33a699ea 100644 --- a/1.6/1.6/Defs/PawnKinds/PawnKinds_Wula.xml +++ b/1.6/1.6/Defs/PawnKinds/PawnKinds_Wula.xml @@ -277,4 +277,57 @@ 1 + + + + Wula_PIA_Heavy_Unit + + WulaSpecies + +
  • + + Wula/Item/WULA_Species_Icon + SRA/Pawn/Mechanoid/AllegianceOverlays/None + CutoutWithOverlay + Graphic_Multi + 1.1 + + (0.2, 0.3, 0.2) + + +
  • +
    + 18 + 20 + 500 + 10~20 + 10~20 + Poor + true + +
  • Wula_Armor_Super_Heavy
  • +
    + +
  • Wula_Melee_Weapon_T1
  • +
  • Wula_Melee_Weapon_T3
  • +
  • Wula_Ranged_Weapon_T2
  • +
    + + + 3000~8000 + 1 + 999999~999999 + 1000~2000 + +
  • WULA_AutoJumpdrive
  • +
    + + +
  • + +
  • Wula_Backstory_Categories
  • + + +
    +
    \ No newline at end of file diff --git a/1.6/1.6/Defs/ThingDefs_Misc/WULA_Flyover_Item.xml b/1.6/1.6/Defs/ThingDefs_Misc/WULA_Flyover_Item.xml index 6a3c464b..c9793940 100644 --- a/1.6/1.6/Defs/ThingDefs_Misc/WULA_Flyover_Item.xml +++ b/1.6/1.6/Defs/ThingDefs_Misc/WULA_Flyover_Item.xml @@ -719,17 +719,6 @@ false MetaOverlays -
  • - 300 - 30 - 65 - WULA_Firepower_Primary_Cannon_Strafe_Skyfaller - 3 - - - true - true -
  • 60 @@ -740,58 +729,13 @@ true false
  • - -
  • - WULA_BattleShip_Planet_Interdiction - - - 0 - 5 - 1 - - - 0 - 40 - 5 - true - 10 - 70 - - - 1 - 10 - false - - - true - false - true - - - true - - - - 0.4 - 0.6 - - - - true - - 0.6 - 0.8 - - (0.7,0.85,1.0,1.0) - 1.3 -
  • WULA_Striker_Escort 1000 - 20 - 1 + 30 + 2 0 @@ -802,7 +746,7 @@ 70 - 25 + 50 10 false @@ -830,23 +774,23 @@ 1.3
  • - WULA_Bomber_Escort + WULA_BattleShip_Planet_Interdiction 1350 - 10 + 4 1 0 - 130 + 60 5 true - 10 - 70 + 30 + 60 - 10 + 30 10 false @@ -931,108 +875,6 @@ true true
  • -
  • - 300 - 30 - 25 - WULA_Planet_Interdiction_EnergyLance_Skyfaller - 1 - - - true - true -
  • -
    - - - WULA_Planet_Interdiction_EnergyLance_Skyfaller - - (1,1) - - Wula/Weapon/WULA_Weapon_Empty - Graphic_Single - TransparentPostLight - (1,1) - (255,255,255,150) - - false - - - - Decelerate - Things/Skyfaller/SkyfallerShadowDropPod - (0, 0) - DropPod_Fall - 100 - - 0.05 - 0 - 0 - - -
  • (0,0)
  • -
  • (1, 1)
  • -
    -
    - WULA_Planet_Interdiction_EnergyLance_Beacon -
    -
    - - WULA_Planet_Interdiction_EnergyLance_Beacon - - 一枚标定监视区的轰炸信标,进入此处的敌对势力都会被乌拉帝国舰队的舰炮狠狠打击。 - Wula/Building/WULA_WeaponArmor_Productor - Normal - false - false - (1,1) - - Wula/Weapon/WULA_Weapon_Empty - Graphic_Single - TransparentPostLight - (72,72) - (255,255,255,150) - - false - - - Building - Standable - false - 0.5 - false - 0 - false - false - - 1 - 0 - 0 - - 0 - - false - BuildingDestroyed_Metal_Small - - -
  • - WULA_EnergyLance_Surveillance - 600 - 25 - 36 - 30 - 20 - 45 - 180 -
  • -
  • - - true - false -
  • -
  • - 600 -
  • diff --git a/1.6/1.6/Defs/ThingDefs_Misc/Weapons/WULA_FE_Manpack_Weapon.xml b/1.6/1.6/Defs/ThingDefs_Misc/Weapons/WULA_FE_Manpack_Weapon.xml index f2f42d4b..5d095413 100644 --- a/1.6/1.6/Defs/ThingDefs_Misc/Weapons/WULA_FE_Manpack_Weapon.xml +++ b/1.6/1.6/Defs/ThingDefs_Misc/Weapons/WULA_FE_Manpack_Weapon.xml @@ -110,7 +110,7 @@ CutoutComplex -
  • Wula_Melee_Weapon_T2
  • +
  • Wula_Melee_Weapon_T1
  • -65 Spacer diff --git a/Source/WulaFallenEmpire/HediffComp/HediffCompProperties_DisappearWithEffect .cs b/Source/WulaFallenEmpire/HediffComp/HediffCompProperties_DisappearWithEffect .cs new file mode 100644 index 00000000..8a3b6929 --- /dev/null +++ b/Source/WulaFallenEmpire/HediffComp/HediffCompProperties_DisappearWithEffect .cs @@ -0,0 +1,279 @@ +using RimWorld; +using Verse; +using Verse.Sound; + +namespace WulaFallenEmpire +{ + // HediffCompProperties 定义 + public class HediffCompProperties_DisappearWithEffect : HediffCompProperties_Disappears + { + public FleckDef fleckDef; // 要播放的特效 + public float fleckScale = 1f; // 特效缩放 + public bool dropEquipment = false; // 是否掉落装备(false = 直接销毁) + public bool destroyCorpse = true; // 是否销毁尸体 + public bool playSound = true; // 是否播放音效 + public SoundDef soundDef; // 自定义音效 + + public HediffCompProperties_DisappearWithEffect() + { + compClass = typeof(HediffComp_DisappearWithEffect); + } + } + + // HediffComp 实现 + public class HediffComp_DisappearWithEffect : HediffComp + { + public HediffCompProperties_DisappearWithEffect Props => + (HediffCompProperties_DisappearWithEffect)props; + + private int ticksUntilDisappear = -1; + private bool triggered = false; + + public override void CompPostMake() + { + base.CompPostMake(); + if (Props.disappearsAfterTicks != null) + { + ticksUntilDisappear = Props.disappearsAfterTicks.RandomInRange; + } + } + + // 重写 CompPostTick 方法,在到达指定 tick 时触发效果 + public override void CompPostTick(ref float severityAdjustment) + { + base.CompPostTick(ref severityAdjustment); + + if (triggered || Pawn == null || Pawn.Destroyed) return; + + // 检查是否到达消失时间 + if (ticksUntilDisappear > 0) + { + ticksUntilDisappear--; + if (ticksUntilDisappear <= 0) + { + TriggerDisappearEffect(); + } + } + // 如果 pawn 已经死亡,立即触发效果 + else if (Pawn.Dead) + { + TriggerDisappearEffect(); + } + } + + // 处理 pawn 死亡事件 - 修复参数问题 + public override void Notify_PawnDied(DamageInfo? dinfo, Hediff culprit = null) + { + base.Notify_PawnDied(dinfo, culprit); + if (!triggered) + { + TriggerDisappearEffect(); + } + } + + // 触发消失效果的核心方法 + private void TriggerDisappearEffect() + { + if (triggered || Pawn == null || Pawn.Map == null || Pawn.Destroyed) + return; + + triggered = true; + + try + { + // 记录位置 + IntVec3 position = Pawn.Position; + Map map = Pawn.Map; + + // 1. 清除所有装备 + ClearAllEquipment(map); + + // 2. 播放特效 + PlayFleckEffect(position, map); + + // 3. 播放音效 + PlaySoundEffect(position, map); + + // 4. 发送消失消息(如果配置了) + SendDisappearMessage(); + + // 5. 删除 pawn + DestroyPawn(); + + Log.Message($"[DisappearWithEffect] Pawn {Pawn.LabelCap} disappeared at {position}"); + } + catch (System.Exception ex) + { + Log.Error($"[DisappearWithEffect] Error in TriggerDisappearEffect: {ex}"); + } + } + + // 清除所有装备 - 修复参数问题 + private void ClearAllEquipment(Map map) + { + if (Pawn.equipment == null && Pawn.apparel == null && Pawn.inventory == null) + return; + + // 清除装备(武器) + if (Pawn.equipment != null) + { + var allEquipment = Pawn.equipment.AllEquipmentListForReading.ListFullCopy(); + foreach (var thing in allEquipment) + { + if (Props.dropEquipment) + { + // 掉落装备 - 修复类型转换问题 + ThingWithComps droppedWeapon; + Pawn.equipment.TryDropEquipment(thing, out droppedWeapon, Pawn.Position, true); + } + else + { + // 直接销毁装备 + thing.Destroy(DestroyMode.Vanish); + } + } + } + + // 清除 apparel(服装) + if (Pawn.apparel != null) + { + var wornApparel = Pawn.apparel.WornApparel.ListFullCopy(); + foreach (var apparel in wornApparel) + { + if (Props.dropEquipment) + { + // 掉落服装 + Apparel droppedApparel; + Pawn.apparel.TryDrop(apparel, out droppedApparel, Pawn.Position, true); + } + else + { + // 直接销毁服装 + apparel.Destroy(DestroyMode.Vanish); + } + } + } + + // 清除 inventory(物品栏) + if (Pawn.inventory != null) + { + var innerContainer = Pawn.inventory.innerContainer.InnerListForReading.ListFullCopy(); + foreach (var thing in innerContainer) + { + if (Props.dropEquipment) + { + // 掉落物品 + Thing droppedThing; + Pawn.inventory.innerContainer.TryDrop(thing, Pawn.Position, map, ThingPlaceMode.Near, out droppedThing); + } + else + { + // 直接销毁物品 + thing.Destroy(DestroyMode.Vanish); + } + } + } + } + + // 播放特效 + private void PlayFleckEffect(IntVec3 position, Map map) + { + FleckDef fleckToUse = Props.fleckDef ?? FleckDefOf.PsycastAreaEffect; + + // 在 pawn 位置播放特效 + FleckMaker.Static(position, map, fleckToUse, Props.fleckScale); + + // 额外在周围格子上播放特效,增强视觉效果 + for (int i = 0; i < 8; i++) + { + IntVec3 nearbyCell = position + GenAdj.AdjacentCells[i]; + if (nearbyCell.InBounds(map)) + { + FleckMaker.Static(nearbyCell, map, fleckToUse, Props.fleckScale * 0.7f); + } + } + } + + // 播放音效 - 修复音效播放问题 + private void PlaySoundEffect(IntVec3 position, Map map) + { + if (!Props.playSound) return; + + SoundDef soundToUse = Props.soundDef ?? SoundDefOf.PsycastPsychicPulse; + + // 使用 SoundStarter 播放音效 + SoundInfo soundInfo = SoundInfo.InMap(new TargetInfo(position, map)); + soundToUse.PlayOneShot(soundInfo); + } + + // 发送消失消息 + private void SendDisappearMessage() + { + var disappearProps = props as HediffCompProperties_Disappears; + if (disappearProps?.messageOnDisappear != null) + { + Messages.Message(disappearProps.messageOnDisappear.Translate(Pawn.LabelShort), + Pawn, MessageTypeDefOf.NeutralEvent); + } + + if (disappearProps?.letterLabelOnDisappear != null && + disappearProps?.letterTextOnDisappear != null && + Pawn.Faction == Faction.OfPlayer) + { + Find.LetterStack.ReceiveLetter( + disappearProps.letterLabelOnDisappear.Translate(Pawn.LabelShort), + disappearProps.letterTextOnDisappear.Translate(Pawn.LabelShort), + LetterDefOf.NeutralEvent, + new LookTargets(Pawn) + ); + } + } + + // 删除 pawn + private void DestroyPawn() + { + if (Pawn.Dead && Props.destroyCorpse) + { + // 如果是尸体,直接销毁 + Pawn.Destroy(); + } + else if (!Pawn.Dead) + { + // 如果是活着的 pawn,先杀死再销毁 + Pawn.Kill(null, this.parent); + if (Props.destroyCorpse) + { + Pawn.Destroy(); + } + } + } + + // 重写 CompTipStringExtra 显示额外信息 + public override string CompTipStringExtra + { + get + { + if (ticksUntilDisappear > 0 && Props.showRemainingTime) + { + return "DisappearWithEffect_TimeRemaining".Translate( + ticksUntilDisappear.ToStringTicksToPeriod(Props.canUseDecimalsShortForm)); + } + return null; + } + } + + // 重写 CompDebugString 用于调试 + public override string CompDebugString() + { + return $"Will disappear in: {ticksUntilDisappear} ticks (Triggered: {triggered})"; + } + + // 序列化数据 + public override void CompExposeData() + { + base.CompExposeData(); + Scribe_Values.Look(ref ticksUntilDisappear, "ticksUntilDisappear", -1); + Scribe_Values.Look(ref triggered, "triggered", false); + } + } +} diff --git a/Source/WulaFallenEmpire/WulaFallenEmpire.csproj b/Source/WulaFallenEmpire/WulaFallenEmpire.csproj index 37906a23..f16d3758 100644 --- a/Source/WulaFallenEmpire/WulaFallenEmpire.csproj +++ b/Source/WulaFallenEmpire/WulaFallenEmpire.csproj @@ -160,6 +160,7 @@ +