Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file modified Classes/Relics/Assets/Relic_BloodMoney.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion Classes/Relics/Assets/Relic_BloodMoney.png.import
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

importer="texture"
type="CompressedTexture2D"
uid="uid://b6lpt3cbkdnli"
uid="uid://dvuhv286d0trp"
path="res://.godot/imported/Relic_BloodMoney.png-d130382b6c03f59c21d5962c3d5f6e5a.ctex"
metadata={
"vram_texture": false
Expand Down
Binary file modified Classes/Relics/Assets/Relic_BrokenDrumstick.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion Classes/Relics/Assets/Relic_BrokenDrumstick.png.import
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

importer="texture"
type="CompressedTexture2D"
uid="uid://c8j841tqqkqeb"
uid="uid://cu26dy5itkd4m"
path="res://.godot/imported/Relic_BrokenDrumstick.png-94c905ef353da245ad24e71cbd686e66.ctex"
metadata={
"vram_texture": false
Expand Down
Binary file added Classes/Relics/Assets/Relic_Coupon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
34 changes: 34 additions & 0 deletions Classes/Relics/Assets/Relic_Coupon.png.import
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
[remap]

importer="texture"
type="CompressedTexture2D"
uid="uid://c7kegse3tt25t"
path="res://.godot/imported/Relic_Coupon.png-fbc4593b2a2e278d51828d9813481a77.ctex"
metadata={
"vram_texture": false
}

[deps]

source_file="res://Classes/Relics/Assets/Relic_Coupon.png"
dest_files=["res://.godot/imported/Relic_Coupon.png-fbc4593b2a2e278d51828d9813481a77.ctex"]

[params]

compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
compress/hdr_compression=1
compress/normal_map=0
compress/channel_pack=0
mipmaps/generate=false
mipmaps/limit=-1
roughness/mode=0
roughness/src_normal=""
process/fix_alpha_border=true
process/premult_alpha=false
process/normal_map_invert_y=false
process/hdr_as_srgb=false
process/hdr_clamp_exposure=false
process/size_limit=0
detect_3d/compress_to=1
Binary file modified Classes/Relics/Assets/Relic_LooseChange.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion Classes/Relics/Assets/Relic_LooseChange.png.import
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

importer="texture"
type="CompressedTexture2D"
uid="uid://bocp4uhgovyv1"
uid="uid://xicfogph25bj"
path="res://.godot/imported/Relic_LooseChange.png-496af612042666a7f384e1eb8d4167ce.ctex"
metadata={
"vram_texture": false
Expand Down
Binary file modified Classes/Relics/Assets/Relic_LuckyDice.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion Classes/Relics/Assets/Relic_LuckyDice.png.import
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

importer="texture"
type="CompressedTexture2D"
uid="uid://dv8u82rj2vkxu"
uid="uid://c4sx72edrmarc"
path="res://.godot/imported/Relic_LuckyDice.png-88ca6d67d74b2a5f34af4000f643b3a7.ctex"
metadata={
"vram_texture": false
Expand Down
Binary file modified Classes/Relics/Assets/Relic_SecondPick.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion Classes/Relics/Assets/Relic_SecondPick.png.import
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

importer="texture"
type="CompressedTexture2D"
uid="uid://cbv2j4ysk3ydd"
uid="uid://bjw3cyofjjxv6"
path="res://.godot/imported/Relic_SecondPick.png-0361bd1bad087f4d81be27c9c5b3fe2b.ctex"
metadata={
"vram_texture": false
Expand Down
Binary file modified Classes/Relics/Assets/Relic_Shortcut.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion Classes/Relics/Assets/Relic_Shortcut.png.import
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

importer="texture"
type="CompressedTexture2D"
uid="uid://cgcc27uov731g"
uid="uid://cyonk7kn213ik"
path="res://.godot/imported/Relic_Shortcut.png-d03004b4d7d0b125c8da23d3a2ca0db2.ctex"
metadata={
"vram_texture": false
Expand Down
Binary file modified Classes/Relics/Assets/Relic_SpikedShield.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion Classes/Relics/Assets/Relic_SpikedShield.png.import
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

importer="texture"
type="CompressedTexture2D"
uid="uid://yukvjlpcbpt6"
uid="uid://dlivs0hony8p8"
path="res://.godot/imported/Relic_SpikedShield.png-59642dbb734140b3422c00600f46526b.ctex"
metadata={
"vram_texture": false
Expand Down
17 changes: 17 additions & 0 deletions Globals/Scribe.cs
Original file line number Diff line number Diff line change
Expand Up @@ -524,6 +524,23 @@ e is BattleDirector.Harbinger.OnDamageInstanceArgs dmgArgs
),
}
),
new RelicTemplate(
17,
"Coupon",
Rarity.Common,
GD.Load<Texture2D>("res://Classes/Relics/Assets/Relic_Coupon.png"),
new RelicEffect[]
{
new RelicEffect(
BattleEffectTrigger.OnPickup,
10,
(e, self, val) =>
{
StageProducer.PlayerStats.DiscountPercent += val;
}
),
}
),
};

public static readonly SongTemplate[] SongDictionary = new[] //Generalize and make pools for areas/room types
Expand Down
2 changes: 2 additions & 0 deletions Globals/Translations/Translations.csv
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,8 @@ RELIC_BROKENDRUMSTICK_NAME,Broken Drumstick,破碎的鼓棒
RELIC_BROKENDRUMSTICK_TOOLTIP,"Enemies start combat damaged.","敌人在战斗开始时受到伤害。"
RELIC_BLOODMONEY_NAME,Blood Money,血腥钱袋
RELIC_BLOODMONEY_TOOLTIP,"Gain money when taking damage below half health.","在生命值低于一半时受到伤害可获得金钱。"
RELIC_COUPON_NAME,Coupon,优惠券
RELIC_COUPON_TOOLTIP,"Get a 10% discount on notes and relics in the shop.","在商店购买音符和遗物时可享受9折优惠。"
INVENTORY_TAB_NOTES,Notes,乐谱
INVENTORY_TAB_RELICS,Relics,遗物
OPTIONS_VOLUME_LABEL,Master Volume,最终音量设置
Expand Down
2 changes: 2 additions & 0 deletions Scenes/Puppets/Scripts/PlayerStats.cs
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ public partial class PlayerStats : Resource
public int RewardAmountModifier = 0;
public int Rerolls = 0;
public int Shortcuts = 0;
public int DiscountPercent = 0;

//Array in order of descending rarities, Legendary -> ... Common. Int odds out of 100.
public int[] RarityOdds = [1, 5, 10, 20, 100];
Expand Down Expand Up @@ -77,6 +78,7 @@ public void RemoveNote(int index)

CurNotes = CurNotes.Where((_, i) => i != index).ToArray();
}

public void RemoveNote(Note nSelection)
{
CurNotes = CurNotes.Where(n => n != nSelection).ToArray();
Expand Down
2 changes: 1 addition & 1 deletion Scenes/ShopScene/Scripts/ShopScene.cs
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ private void AddShopItem(GridContainer container, IDisplayable item, int price)
GD.PushError("AddShopItem called with null!");
return;
}
price = Math.Max(price, 0); //Price can't go negative.
price = Math.Max(price - (price * StageProducer.PlayerStats.DiscountPercent / 100), 0); //Price can't go negative.
ShopItem newItem = GD.Load<PackedScene>(ShopItem.LoadPath).Instantiate<ShopItem>();
newItem.Display(price, item.Texture, item.Name);
newItem.DisplayButton.Pressed += () => SetPurchasable(item, newItem);
Expand Down