Skip to content

Commit

Permalink
0.4.2.1
Browse files Browse the repository at this point in the history
  • Loading branch information
Yuria-Shikibe committed Jul 13, 2023
1 parent 232cd71 commit 2df820d
Show file tree
Hide file tree
Showing 11 changed files with 90 additions and 55 deletions.
6 changes: 3 additions & 3 deletions assets/bundles/bundle_zh_CN.properties
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ unit.new-horizon-macrophage.name = 巨噬
unit.new-horizon-macrophage.description = 未知科技\n重型炮艇,会环绕敌人
ability.adaptedheal = 高级修复系统
ability.boost = 定向冲刺
ability.gravity-trap = 重力井: [accent]{0}[]格
ability.gravity-trap = 重力阱: [accent]{0}[]格
ability.healfield = 范围方块修复
ability.phase = 相位传送
ability.shockwave = 冲击波发生器
Expand Down Expand Up @@ -88,7 +88,7 @@ block.new-horizon-fusion-collapser.name = 聚变反应堆
block.new-horizon-fusion-core-energy-factory.description = 封存聚变能量。\n计算机磁控,磁化重钢作外壳收容封存能量。\n请注意,\n一切封存能量类物资皆应轻拿轻放,颠簸不得,后果自负。\n冷聚变温度也足以焚毁有机体,请有关者注意安全。
block.new-horizon-fusion-core-energy-factory.name = 聚变能封存器
block.new-horizon-gravity-gully.description = 干扰超空间核。\n在一块撑着的布上放一质量物体,其周围向下凹陷,同样,大质量天体也能令周围空间产生类似凹陷,周围的小天体会向凹陷里陷落,引力就是这样产生的。而电磁波具有能动张量,根据场方程其对应一非平直度规场。所以,使用能量制造重力并非妄言。
block.new-horizon-gravity-gully.name = 重力井
block.new-horizon-gravity-gully.name = 重力阱
block.new-horizon-gravity-trap-small.description = 虽然很小,但跟标准重力阱一样可靠。
block.new-horizon-gravity-trap-small.name = 小型重力阱
block.new-horizon-gravity.description = 同时吸引多个单位。
Expand All @@ -107,7 +107,7 @@ block.new-horizon-huge-battery.description = 能量容量更大
block.new-horizon-huge-battery.name = 高密度电池
block.new-horizon-hyper-generator.description = 释放封装零位能蕴含的能量。\n疯狂的造物上镌刻的是人类对能源稀缺的恐惧。随着空间中蕴含的巨大能量被释放,危险的焰火直冲云霄。绝对真空零度的内里无法阻挡其冲向天穹。特高压能量流需要特制设备接收并转发。周围6公里禁止未完全防护者、无三防载具接近。必须部署在安全等级高于甲的地区。反应堆无论启动还是关机都需要成本,请尽量不改变其运行状态。
block.new-horizon-hyper-generator.name = 临界反应堆
block.new-horizon-hyper-space-warper.description = 用于传送单位。\n\n[sky]可被重力井阻断。\n\n[lightgrey]你可以在HUD上看到敌方重力阱的干扰范围。重力阱会使经过它的超空间折跃强行跳出,并对单位造成百分比伤害。\n史蒂芬·霍金先生曾多次讨论了超空间跳跃的可能性,提出了基于“弦理论”进行空间跳跃的设想,认为运用足够的能量就可以制作出一个能量巨大的“弦”,将太空船带入超空间跳跃航行,因此在霍金看来超空间跳跃理论上是可行的。同时,他一方面认为虫洞极难发现且被人类利用,另一方面也认为通过虫洞进行空间跳跃并非空谈。在最终提出的三个方案中,人类的选择有“超空间核”。\n使用超空间核跳跃的条件:*目的地没有干扰跳跃的物质和力场。\n*超空间核充电完毕。\n*能够有效地控制超空间核。\n但条件有限,此设备只能完成战地折跃。
block.new-horizon-hyper-space-warper.description = 用于传送单位。\n\n[sky]可被重力阱阻断。\n\n[lightgrey]你可以在HUD上看到敌方重力阱的干扰范围。重力阱会使经过它的超空间折跃强行跳出,并对单位造成百分比伤害。\n史蒂芬·霍金先生曾多次讨论了超空间跳跃的可能性,提出了基于“弦理论”进行空间跳跃的设想,认为运用足够的能量就可以制作出一个能量巨大的“弦”,将太空船带入超空间跳跃航行,因此在霍金看来超空间跳跃理论上是可行的。同时,他一方面认为虫洞极难发现且被人类利用,另一方面也认为通过虫洞进行空间跳跃并非空谈。在最终提出的三个方案中,人类的选择有“超空间核”。\n使用超空间核跳跃的条件:*目的地没有干扰跳跃的物质和力场。\n*超空间核充电完毕。\n*能够有效地控制超空间核。\n但条件有限,此设备只能完成战地折跃。
block.new-horizon-hyper-space-warper.name = 超空间核折跃器
block.new-horizon-insulated-wall.description = “便宜就完事了!”
block.new-horizon-insulated-wall.name = 绝缘墙
Expand Down
2 changes: 1 addition & 1 deletion mod.hjson
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@ author: "Yuria"
name: "new-horizon"
main: "newhorizon.NewHorizon"
description: "Warning: Beta Version For V7"
version: "0.4.2"
version: "0.4.2.1"

minGameVersion: 145.1
2 changes: 1 addition & 1 deletion src/newhorizon/NHRegister.java
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ public static void load(){
if(!Vars.headless && Vars.net.active() && !NHSetting.getBool(NHSetting.VANILLA_COST_OVERRIDE)){
Core.app.post(() -> {
Vars.ui.showConfirm("@mod.ui.requite.need-override", NHSetting::showDialog);
Vars.player.con.close();
Vars.net.disconnect();
});
}

Expand Down
2 changes: 1 addition & 1 deletion src/newhorizon/NHSetting.java
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ public void buildTable(Table table){
}

public static boolean enableDetails(){
return true;
return enableEffectDetail;
}

public static boolean getBool(String key){
Expand Down
7 changes: 7 additions & 0 deletions src/newhorizon/TestRunner.java
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,13 @@ public static void main(String[] args){
System.out.println("Y: " + dy / 4f + "f");
System.out.println("-------------");
}

int i;
for(i = 0; i < 5; i++){
System.out.println(i);
}

System.out.println(i);
}

// System.out.println("\uf15c\uf15b\uf0f6\ue802\ue803\ue804\ue805\ue807\ue800\ue808\ue809\ue80b\ue80f\uf300\uf1c5\ue813\ue816\ue819\ue81a\uf0b0\ue81d\ue822\ue824\ue825\ue826\ue827\ue823\ue829\ue806\ue811\ue815\ue818\uf120\ue835\ue836\uf129\ue837\ue839\ue83a\ue83b\ue83e\ue83f\uf12d\ue801\uf029\ue812\ue842\ue844\ue80d\ue81e\uf281\uf308\ue83d\ue845\uf181\ue80e\ue814\ue817\ue81b\ue81c\ue82a\ue82b\ue82c\ue82d\ue830\ue84c\ue852\ue853\ue85b\ue85c\ue85d\ue85e\ue85f\ue861\ue865\ue867\ue868\ue869\ue86a\ue86b\ue86c\ue86d\ue86e\ue86f\ue870\ue871\ue872\ue873\ue874\ue875\ue876\ue877\ue878\ue879\ue87b\ue87c\ue87d\ue88a\ue88b\ue810\ue88c\ue88d\ue88e\ue88f⚠\ue864\ue84d\ue833");
Expand Down
8 changes: 4 additions & 4 deletions src/newhorizon/content/NHBlocks.java
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@ private static void loadEnv(){
lightColor = NHColor.darkEnrColor.cpy().lerp(Color.black, 0.1f);
blendGroup = this;

attributes.set(Attribute.heat, 0.25f);
attributes.set(Attribute.heat, 0.05f);
attributes.set(Attribute.water, -1f);
attributes.set(Attribute.oil, -1f);
attributes.set(Attribute.spores, -1f);
Expand All @@ -231,7 +231,7 @@ private static void loadEnv(){
lightColor = NHColor.darkEnrColor.cpy().lerp(Color.black, 0.2f);
blendGroup = this;

attributes.set(Attribute.heat, 0.5f);
attributes.set(Attribute.heat, 0.15f);
attributes.set(Attribute.water, -1f);
attributes.set(Attribute.oil, -1f);
attributes.set(Attribute.spores, -1f);
Expand All @@ -255,7 +255,7 @@ private static void loadEnv(){

wall = NHBlocks.metalWall;

attributes.set(Attribute.heat, 0.5f);
attributes.set(Attribute.heat, 0.25f);
attributes.set(Attribute.water, -1f);
attributes.set(Attribute.oil, -1f);
attributes.set(Attribute.spores, -1f);
Expand Down Expand Up @@ -3613,7 +3613,7 @@ public void draw(){
with(Items.thorium, 90, Items.graphite, 50, NHItems.multipleSteel, 60, NHItems.juniorProcessor, 50)
),
new UnitSet(NHUnitTypes.macrophage, new byte[]{NHUnitTypes.ANCIENT_AIR, 4}, 180 * 60f,
with(Items.phaseFabric, 80, NHItems.irayrondPanel, 220, NHItems.presstanium, 160, NHItems.seniorProcessor, 80)
with(Items.phaseFabric, 100, NHItems.irayrondPanel, 150, NHItems.presstanium, 320, Items.tungsten, 400, NHItems.seniorProcessor, 100)
),
new UnitSet(NHUnitTypes.zarkov, new byte[]{NHUnitTypes.NAVY_LINE_1, 4}, 140 * 60f,
ItemStack.with(NHItems.multipleSteel, 400, NHItems.juniorProcessor, 300, NHItems.presstanium, 400, NHItems.metalOxhydrigen, 200)
Expand Down
70 changes: 42 additions & 28 deletions src/newhorizon/content/NHFx.java
Original file line number Diff line number Diff line change
Expand Up @@ -815,31 +815,32 @@ public static Effect sharpBlast(Color colorExternal, Color colorInternal, float
}),

/**{@link Effect.EffectContainer#data}<{@link Position}> as Target */
chainLightningFade = new Effect(45f, 500f, e -> {
chainLightningFade = new Effect(220f, 500f, e -> {
if(!(e.data instanceof Position)) return;
Position p = e.data();
float tx = p.getX(), ty = p.getY(), dst = Mathf.dst(e.x, e.y, tx, ty);
Tmp.v1.set(p).sub(e.x, e.y).nor();

e.lifetime = dst * 0.375f;
float normx = Tmp.v1.x, normy = Tmp.v1.y;
float range = e.rotation;
int links = Mathf.ceil(dst / range);
float spacing = dst / links;

Lines.stroke(2.5f * Mathf.curve(e.fout(), 0, 0.7f));
Draw.color(Color.white, e.color, e.fin());
stroke(2.5f * Mathf.curve(e.fout(), 0, 0.7f));
color(Color.white, e.color, e.fin());

Lines.beginLine();
beginLine();

Fill.circle(e.x, e.y, Lines.getStroke() / 2);
Lines.linePoint(e.x, e.y);
Fill.circle(e.x, e.y, getStroke() / 2);
linePoint(e.x, e.y);

rand.setSeed(e.id);

float fin = Mathf.curve(e.fin(), 0, lightningAlign);
float i;
for(i = 0; i < links * fin; i++){
float nx, ny;
int i;
float nx = e.x, ny = e.y;
for(i = 0; i < (int)(links * fin); i++){
if(i == links - 1){
nx = tx;
ny = ty;
Expand All @@ -850,25 +851,32 @@ public static Effect sharpBlast(Color colorExternal, Color colorInternal, float
ny = e.y + normy * len + Tmp.v1.y;
}

Lines.linePoint(nx, ny);
linePoint(nx, ny);
}

if(NHSetting.enableDetails() && i < links){
float f = Mathf.clamp(fin * links % 1);
float len = (i + 1) * spacing;
Tmp.v1.setToRandomDirection(rand).scl(range/2f);
Tmp.v2.set(nx, ny);
if(i == links - 1)Tmp.v2.lerp(tx, ty, f);
else Tmp.v2.lerp(e.x + (normx * len + Tmp.v1.x), e.y + (normy * len + Tmp.v1.y), f);

linePoint(Tmp.v2.x, Tmp.v2.y);
Fill.circle(Tmp.v2.x, Tmp.v2.y, getStroke() / 2);
}
//
// float f = (fin - i / links);
// Tmp.v1.setToRandomDirection(rand).scl(range / 2f * f);
// float len = (i + 1) * spacing;
// Lines.linePoint(e.x + normx * len + Tmp.v1.x, e.y + normy * len + Tmp.v1.y);
// Fill.circle(e.x + normx * len + Tmp.v1.x, e.y + normy * len + Tmp.v1.y, Lines.getStroke() / 2);

Lines.endLine();
endLine();
}).followParent(false),

/**{@link Effect.EffectContainer} as Target */
chainLightningFadeReversed = new Effect(45f, 500f, e -> {
chainLightningFadeReversed = new Effect(220f, 500f, e -> {
if(!(e.data instanceof Position))return;
Position p = e.data();
float tx = e.x, ty = e.y, dst = Mathf.dst(p.getX(), p.getY(), tx, ty);
Tmp.v1.set(e.x, e.y).sub(p).nor();

e.lifetime = dst * 0.375f;
float normx = Tmp.v1.x, normy = Tmp.v1.y;
float range = e.rotation;
int links = Mathf.ceil(dst / range);
Expand All @@ -885,27 +893,33 @@ public static Effect sharpBlast(Color colorExternal, Color colorInternal, float
rand.setSeed(e.id);

float fin = Mathf.curve(e.fin(), 0, lightningAlign);
float i;
for(i = 0; i < links *fin; i++){
float nx, ny;
int i;
float nx = p.getX(), ny = p.getY();
for(i = 0; i < (int)(links * fin); i++){
if(i == links - 1){
nx = tx;
ny = ty;
}else{
float len = (i + 1) * spacing;
Tmp.v1.setToRandomDirection(rand).scl(range / 2f);
Tmp.v1.setToRandomDirection(rand).scl(range/2f);
nx = p.getX() + normx * len + Tmp.v1.x;
ny = p.getY() + normy * len + Tmp.v1.y;
}

Lines.linePoint(nx, ny);
linePoint(nx, ny);
}

// float f = (fin - i / links);
// Tmp.v1.setToRandomDirection(rand).scl(range / 2f * f);
// float len = (i + 1) * spacing;
// Lines.linePoint(p.getX() + normx * len + Tmp.v1.x, p.getY() + normy * len + Tmp.v1.y);
// Fill.circle(p.getX() + normx * len + Tmp.v1.x, p.getY() + normy * len + Tmp.v1.y, Lines.getStroke() / 2);
if(NHSetting.enableDetails() && i < links){
float f = Mathf.clamp(fin * links % 1);
float len = (i + 1) * spacing;
Tmp.v1.setToRandomDirection(rand).scl(range/2f);
Tmp.v2.set(nx, ny);
if(i == links - 1)Tmp.v2.lerp(tx, ty, f);
else Tmp.v2.lerp(p.getX() + (normx * len + Tmp.v1.x), p.getY() + (normy * len + Tmp.v1.y), f);

linePoint(Tmp.v2.x, Tmp.v2.y);
Fill.circle(Tmp.v2.x, Tmp.v2.y, getStroke() / 2);
}

Lines.endLine();
}).followParent(false),
Expand Down
1 change: 1 addition & 0 deletions src/newhorizon/content/NHStatusEffects.java
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,7 @@ public void update(Unit unit, float time){
speedMultiplier = 1.5f;
damageMultiplier = 1.25f;
healthMultiplier = 1.5f;


textureColor = color = NHColor.lightSkyBack;

Expand Down
35 changes: 25 additions & 10 deletions src/newhorizon/content/NHUnitTypes.java
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,7 @@
import mindustry.ai.types.MinerAI;
import mindustry.content.Fx;
import mindustry.content.StatusEffects;
import mindustry.entities.Damage;
import mindustry.entities.Effect;
import mindustry.entities.Lightning;
import mindustry.entities.Units;
import mindustry.entities.*;
import mindustry.entities.abilities.*;
import mindustry.entities.bullet.*;
import mindustry.entities.effect.MultiEffect;
Expand Down Expand Up @@ -414,7 +411,7 @@ private static void loadWeapon(){

bullet = new AdaptedSapBulletType(){{
length = 320f;
damage = 60f;
damage = 50f;
sapStrength = 0.35f;
lightColor = hitColor = color = NHColor.ancientLightMid;
width = 0.22f;
Expand Down Expand Up @@ -451,7 +448,7 @@ private static void loadWeapon(){
reload = 360;
bullet = new RailBulletType(){{
length = 320f;
damage = 180f;
damage = 160f;

hitColor = NHColor.ancientLightMid;
hitEffect = endEffect = Fx.hitBulletColor;
Expand Down Expand Up @@ -836,8 +833,8 @@ public static void load(){
lightOpacity = 0.1f;

lowAltitude = flying = true;
health = 7000;
armor = 20;
health = 8000;
armor = 22;
hitSize = 32f;
drag /= 5f;

Expand Down Expand Up @@ -1390,7 +1387,13 @@ public void createFrags(Bullet b, float x, float y){
moveY = -5f;
progress = PartProgress.recoil;
}});
}});
}

@Override
protected Teamc findTarget(Unit unit, float x, float y, float range, boolean air, boolean ground){
return Units.bestTarget(unit.team, x, y, range, u -> u.checkTarget(air, ground), t -> ground, UnitSorts.strongest);
}
});
weapons.add(new Weapon(name + "-missile"){{
reload = 240f;
xRand = 10f;
Expand Down Expand Up @@ -2639,6 +2642,7 @@ public void draw(Bullet b){

warper = new NHUnitType("warper"){{
outlineColor = OColor;
aiController = SurroundAI::new;
constructor = EntityMapping.map(3);
weapons.add(new Weapon(){{
top = false;
Expand Down Expand Up @@ -3647,13 +3651,24 @@ public void drawSoftShadow(Unit unit){

weapons.add(laserCannon);

abilities.add(new TurretShield(){{
radius = hitSize + 112f;
angle = 130;
regen = 3f;
cooldown = 60f * 10f;
max = 10000f;
width = 24f;
drawWidth = 12f;
whenShooting = false;
}});

immunities.addAll(StatusEffects.blasted, StatusEffects.tarred, StatusEffects.burning, StatusEffects.freezing, StatusEffects.melting, NHStatusEffects.ultFireBurn, NHStatusEffects.emp1);
targetFlags = new BlockFlag[]{BlockFlag.unitAssembler, BlockFlag.turret, BlockFlag.reactor, BlockFlag.generator, null};

health = 55000;
speed = 0.55f;
drag = 0.18f;
hitSize = 60f;
hitSize = 65f;
armor = 32;
accel = 0.1f;
rotateSpeed = 0.5f;
Expand Down
2 changes: 0 additions & 2 deletions src/newhorizon/expand/block/special/HyperGenerator.java
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
import arc.math.geom.Position;
import arc.struct.EnumSet;
import arc.struct.Seq;
import arc.util.Log;
import arc.util.Strings;
import arc.util.Time;
import arc.util.Tmp;
Expand Down Expand Up @@ -291,7 +290,6 @@ public void updateTile(){
NHFx.lightningHitLarge.at(point.getX(), point.getY(), effectColor);
});

Log.info(optionalEfficiency);
if(optionalEfficiency > 0){
Units.nearby(team, x, y, statusRange, u -> {
Fx.chainLightning.at(x, y, 0, effectColor, u);
Expand Down
10 changes: 5 additions & 5 deletions src/newhorizon/expand/bullets/StrafeLaser.java
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,7 @@
import mindustry.entities.UnitSorts;
import mindustry.entities.Units;
import mindustry.entities.bullet.BulletType;
import mindustry.gen.Building;
import mindustry.gen.Bullet;
import mindustry.gen.Player;
import mindustry.gen.Unit;
import mindustry.gen.*;
import mindustry.graphics.Drawf;
import mindustry.graphics.Layer;
import newhorizon.util.func.NHFunc;
Expand Down Expand Up @@ -182,7 +179,10 @@ public void update(Bullet b){
if(u.isPlayer()){
Player player = (Player)u.controller();
b.fdata = Angles.moveToward(b.fdata, b.angleTo(player.mouseX, player.mouseY), 1f);
}else b.fdata = Angles.moveToward(b.fdata, b.angleTo(Units.bestTarget(b.team, b.x, b.y, range, un -> un.type.canAttack, Building::isValid, UnitSorts.strongest)), 1f);
}else{
Teamc target = Units.bestTarget(b.team, b.x, b.y, range, un -> un.type.canAttack, Building::isValid, UnitSorts.strongest);
if(target != null)b.fdata = Angles.moveToward(b.fdata, b.angleTo(target), 1f);
}
}else b.fdata = Angles.moveToward(b.fdata, b.angleTo(u.aimX, u.aimY), 1f);
}

Expand Down

0 comments on commit 2df820d

Please sign in to comment.