Skip to content

Commit

Permalink
Updated to latest version of WeaverCore. Fixed an issue where the bos…
Browse files Browse the repository at this point in the history
…s would be invincible when the pufferfish mode was turned off
  • Loading branch information
nickc01 committed Jun 17, 2023
1 parent 31b71f7 commit 332500b
Show file tree
Hide file tree
Showing 9 changed files with 33 additions and 12 deletions.
4 changes: 2 additions & 2 deletions Assets/Material/Quality Camera Material.mat
Original file line number Diff line number Diff line change
Expand Up @@ -64,13 +64,13 @@ Material:
- _GlossMapScale: 1
- _Glossiness: 0.5
- _GlossyReflections: 1
- _HueShift: 0.3
- _HueShift: 0.1
- _Metallic: 0
- _Mode: 0
- _OcclusionStrength: 1
- _Parallax: 0.02
- _SatShift: 0
- _ShiftPercentage: 0
- _ShiftPercentage: 1
- _SmoothnessTextureChannel: 0
- _SpecularHighlights: 1
- _SrcBlend: 1
Expand Down
2 changes: 1 addition & 1 deletion Assets/Scripts/Grimm/InfernoKingGrimm.cs
Original file line number Diff line number Diff line change
Expand Up @@ -605,7 +605,7 @@ private void Start()

if (Settings.Infinite)
{
Health.AddModifier<InfiniteHealthModifier>();
HealthComponent.AddModifier<InfiniteHealthModifier>();
}

var quarterHealth = CycleAmount / 4;
Expand Down
5 changes: 3 additions & 2 deletions Assets/Scripts/Grimm/Moves/BalloonMove.cs
Original file line number Diff line number Diff line change
Expand Up @@ -102,13 +102,14 @@ void Awake()

public override IEnumerator DoMove()
{
gameObject.layer = LayerMask.NameToLayer("Enemy Attack");
if (Grimm.Settings.PufferFishDifficulty == PufferFishDifficulty.Off)
{
yield break;
}

DoingBalloonMove = true;
gameObject.layer = LayerMask.NameToLayer("Enemy Attack");

DoingBalloonMove = true;
healthManager.Invincible = true;

//Debug.Log("Doing Balloon Move for grimm " + InfernoKingGrimm.GrimmsFighting.IndexOf(Grimm));
Expand Down
19 changes: 18 additions & 1 deletion Assets/Scripts/GrimmGlow.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
using System.Collections.Generic;
using UnityEngine;
using WeaverCore;
using WeaverCore.Components;
using WeaverCore.DataTypes;
using WeaverCore.Enums;
using WeaverCore.Interfaces;
Expand All @@ -16,17 +17,33 @@ public class GrimmGlow : MonoBehaviour
//string startingStateName;
Animator animator;

WeaverAnimationPlayer weaverAnimator;

void Awake()
{
if (animator == null)
{
animator = GetComponent<Animator>();
}

if (weaverAnimator == null)
{
weaverAnimator = GetComponent<WeaverAnimationPlayer>();

}
}

void Start()
{
animator.Play("Default");
if (animator != null)
{
animator.Play("Default");
}

if (weaverAnimator != null)
{
weaverAnimator = GetComponent<WeaverAnimationPlayer>();
}
}

/*class Hooks : GrimmHooks
Expand Down
4 changes: 2 additions & 2 deletions Assets/Scripts/GrimmHealth.cs
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,9 @@ public int OnHealthChange(int oldHealth, int newHealth)
if (i < InfernoKingGrimm.GrimmsFighting.Count)
{
var otherGrimm = InfernoKingGrimm.GrimmsFighting[i];
if (otherGrimm.Health.Health != newHealth && otherGrimm != grimm)
if (otherGrimm.HealthComponent.Health != newHealth && otherGrimm != grimm)
{
otherGrimm.Health.Health = newHealth;
otherGrimm.HealthComponent.Health = newHealth;
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion Assets/Scripts/GrimmRealBat.cs
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ public override bool Hit(HitInfo hit)
Grimm.GrimmHealth.Health += (oldHealth - newHealth);
break;
}*/
if (Grimm.Health.HasModifier<InfiniteHealthModifier>())
if (Grimm.HealthComponent.HasModifier<InfiniteHealthModifier>())
{
Grimm.GrimmHealth.Health += (oldHealth - newHealth);
}
Expand Down
2 changes: 1 addition & 1 deletion Assets/Scripts/Mod.cs
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ internal static string GodhomeLanguageHook(string key, string sheetTitle, string

public override string GetVersion()
{
return "4.1.0.2";
return "4.1.0.3";
}
}
}
Expand Down
5 changes: 4 additions & 1 deletion Assets/Test.unity
Original file line number Diff line number Diff line change
Expand Up @@ -821,7 +821,7 @@ PrefabInstance:
- target: {fileID: 114879189269301354, guid: b22bb1337dc0e264bb76cd6328b2ddf4,
type: 3}
propertyPath: _bossStage
value: 3
value: 1
objectReference: {fileID: 0}
m_RemovedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: b22bb1337dc0e264bb76cd6328b2ddf4, type: 3}
Expand Down Expand Up @@ -1986,6 +1986,9 @@ MonoBehaviour:
damage: 32
attackType: 0
hitDirection: 0
OnHitObject:
m_PersistentCalls:
m_Calls: []
--- !u!61 &1348358562
BoxCollider2D:
m_ObjectHideFlags: 0
Expand Down
2 changes: 1 addition & 1 deletion Assets/WeaverCore
Submodule WeaverCore updated 386 files

0 comments on commit 332500b

Please sign in to comment.