Skip to content

Commit

Permalink
Merge pull request #46 from Carifio24/tdcsr
Browse files Browse the repository at this point in the history
Tal'Dorei content
  • Loading branch information
Carifio24 authored Nov 28, 2023
2 parents 9efa82b + 5ab6acd commit ca2a18e
Show file tree
Hide file tree
Showing 15 changed files with 310 additions and 27 deletions.
70 changes: 68 additions & 2 deletions app/src/main/assets/Spells_en.json
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@
"concentration": false,
"desc": "By means of this spell, you use an animal to deliver a message. Choose a Tiny beast you can see within range, such as a squirrel, a blue jay, or a bat. You specify a location, which you must have visited, and a recipient who matches a general description, such as \"a man or woman dressed in the uniform of the town guard\" or \"a red-haired dwarf wearing a pointed hat\". You also speak a message of up to twenty-five words. The target beast travels for the duration of the spell toward the specified location, covering about 50 miles per 24 hours for a flying messenger, or 25 miles for other animals.\nWhen the messenger arrives, it delivers your message to the creature that you described, replicating the sound of your voice. The messenger speaks only to a creature matching the description you gave. If the messenger doesn't reach its destination before the spell ends, the message is lost, and the beast makes its way back to where you cast this spell.",
"duration": "24 hours",
"higher_level": "If you cast this spell using a spell slot of 3nd level or higher, the duration of the spell increases by 48 hours for each slot level above 2nd.",
"higher_level": "If you cast this spell using a spell slot of 3rd level or higher, the duration of the spell increases by 48 hours for each slot level above 2nd.",
"id": 6,
"level": 2,
"locations": [
Expand Down Expand Up @@ -16280,5 +16280,71 @@
"page": 47
}
]
},
{
"casting_time": "1 action",
"classes": [
"Druid",
"Ranger",
"Sorcerer"
],
"components": [
"V",
"S",
"M"
],
"concentration": false,
"desc": "You conjure a deluge of seawater in a 15-foot-radius, 10-foot-tall cylinder centered on a point within range. This water takes the form of a tidal wave, a whirlpool, a waterspout, or another form of your choice. Each creature in the area must succeed on a Strength saving throw against your spell save DC or take 2d8 bludgeoning damage and fall prone. You can choose a number of creatures equal to your spellcasting modifier (minimum of 1) to automatically succeed on this saving throw.\n\nIf you are within the spell's area, as part of the action you use to cast the spell, you can vanish into the deluge and teleport to an unoccupied space that you can see within the spell's area.",
"duration": "Instantaneous",
"higher_level": "",
"id": 524,
"level": 3,
"material": "A strand of wet hair",
"name": "Freedom of the Waves",
"range": "120 feet",
"ritual": false,
"school": "Conjuration",
"subclasses": [
"Open Sea Paladin"
],
"locations": [
{
"sourcebook": "TDCSR",
"page": 176
}
]
},
{
"casting_time": "1 action",
"classes": [
"Druid",
"Ranger",
"Sorcerer"
],
"components": [
"V",
"S",
"M"
],
"concentration": true,
"desc": "Wind wraps around your body, tugging at your hair and clothing as your feet lift off the ground. You gain a flying speed of 60 feet. Additionally, you have advantage on ability checks to avoid being grappled, and on saving throws against being restrained or paralyzed.\n\nWhen you are targeted by a spell or attack while this spell is in effect, you can use a reaction to teleport up to 60 feet to an unoccupied space you can see. If this movement takes you out of range of the triggering spell or attack, you are unaffected by it. This spell then ends when you reappear.",
"duration": "Up to 10 minutes",
"higher_level": "",
"id": 525,
"level": 5,
"material": "A scrap of sailcloth",
"name": "Freedom of the Winds",
"range": "Self",
"ritual": false,
"school": "Abjuration",
"subclasses": [
"Open Sea Paladin"
],
"locations": [
{
"sourcebook": "TDCSR",
"page": 176
}
]
}
]
]
66 changes: 66 additions & 0 deletions app/src/main/assets/Spells_pt.json
Original file line number Diff line number Diff line change
Expand Up @@ -15172,5 +15172,71 @@
"subclasses": [
"Dimir Operative"
]
},
{
"casting_time": "1 ação",
"classes": [
"Druida",
"Patrulheiro",
"Feiticeiro"
],
"components": [
"V",
"S",
"M"
],
"concentration": false,
"desc": "Você conjura um dilúvio de água do mar em um cilindro de 4,5 metros de raio e 3 metros de altura centrado em um ponto dentro do alcance. Essa água assume a forma de um maremoto, um redemoinho, uma tromba d'água ou outra forma de sua escolha. Cada criatura na área deve ser bem sucedida em um teste de resistência de Força contra sua CD de resistência de magia ou sofrerá 2d8 de dano de concussão e cairá no chão. Você pode escolher um número de criaturas igual ao seu modificador de conjuração (mínimo de 1) para obter sucesso automático neste teste de resistência.\n\nSe você estiver dentro da área da magia, como parte da ação usada para conjurar a magia, você pode desaparecer no dilúvio e se teletransportar para um espaço desocupado que você possa ver dentro da área da magia.",
"duration": "Instantânea",
"higher_level": "",
"id": 524,
"level": 3,
"material": "Uma mecha de cabelo molhado",
"name": "Liberdade das Ondas",
"range": "36 metros",
"ritual": false,
"school": "Conjuração",
"subclasses": [
"Open Sea Paladin"
],
"locations": [
{
"sourcebook": "CCTDR",
"page": 176
}
]
},
{
"casting_time": "1 ação",
"classes": [
"Druida",
"Patrulheiro",
"Feiticeiro"
],
"components": [
"V",
"S",
"M"
],
"concentration": true,
"desc": "O vento envolve seu corpo, puxando seus cabelos e roupas enquanto seus pés se levantam do chão. Você ganha deslocamento de vôo de 18 metros. Além disso, você tem vantagem em testes de habilidade para evitar ser agarrado e em testes de resistência contra ser contido ou paralisado.\n\nQuando você é alvo de uma magia ou ataque enquanto esta magia estiver em vigor, você pode usar uma reação para se teletransportar até 18 metros para um espaço desocupado que você possa ver. Se esse movimento tirar você do alcance do feitiço ou ataque desencadeador, você não será afetado por ele. Este feitiço termina quando você reaparece.",
"duration": "Até 10 minutos",
"higher_level": "",
"id": 525,
"level": 5,
"material": "Um pedaço de lona",
"name": "Liberdade dos Ventos",
"range": "Pessoal",
"ritual": false,
"school": "Abjuração",
"subclasses": [
"Open Sea Paladin"
],
"locations": [
{
"sourcebook": "CCTDR",
"page": 176
}
]
}
]
1 change: 1 addition & 0 deletions app/src/main/java/dnd/jon/spellbook/Source.java
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ public class Source implements NameDisplayable {
static final Source STRIXHAVEN_COC = new Source(R.string.scc_name, R.string.scc_code, "Strixhaven: A Curriculum of Chaos", "SCC", false);
static final Source ASTRAL_AG = new Source(R.string.aag_name, R.string.aag_code, "Astral Adventurer's Guide", "AAG", false);
static final Source GUILDMASTERS_GTR = new Source(R.string.ggr_name, R.string.ggr_code, "Guildmaster's Guide to Ravnica", "GGR", false);
static final Source TALDOREI_CSR = new Source(R.string.tdcsr_name, R.string.tdcsr_code, "Tal'Dorei Campaign Setting Reborn", "TDCSR", false);

// Constructor
private Source(int value, int displayNameID, int codeID, String internalName, String internalCode, boolean core, boolean created) {
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/java/dnd/jon/spellbook/SpellCodec.java
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ List<Spell> parseSpellList(@Nullable JSONArray jsonArray, boolean useInternal, L

try {
for (int i = 0; i < jsonArray.length(); i++) {
Spell nextSpell = parseSpell(jsonArray.getJSONObject(i), b, useInternal);
final Spell nextSpell = parseSpell(jsonArray.getJSONObject(i), b, useInternal);
spells.add(nextSpell);
}
} catch (JSONException e) {
Expand Down
2 changes: 2 additions & 0 deletions app/src/main/java/dnd/jon/spellbook/Spellbook.java
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ class Spellbook {
static final Version V_3_0_0 = new Version(3, 0, 0);
static final Version V_3_0_4 = new Version(3,0,4);
static final Version V_3_0_6 = new Version(3, 0, 6);
static final Version V_3_5_0 = new Version(3, 5, 0);

//static final Version[] VERSIONS = { V_2_0_0, V_2_10_0, V_2_11_0, V_2_11_0, V_2_12_0, V_2_13_0,
// V_3_0_4, V_3_0_6 };
Expand All @@ -33,6 +34,7 @@ class Spellbook {
put(V_2_13_0, Arrays.asList(Source.STRIXHAVEN_COC));
put(V_3_0_4, Arrays.asList(Source.ASTRAL_AG));
put(V_3_0_6, Arrays.asList(Source.GUILDMASTERS_GTR));
put(V_3_5_0, Arrays.asList(Source.TALDOREI_CSR));
}};

static Collection<Source> newSourcesForVersion(Version version) {
Expand Down
3 changes: 2 additions & 1 deletion app/src/main/java/dnd/jon/spellbook/Subclass.java
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@ enum Subclass {
CLOCKWORK_SOUL(16, "Clockwork Soul"),
ABERRANT_MIND(17, "Aberrant Mind"),
DIVINE_SOUL(18, "Divine Soul"),
DIMIR_OPERATIVE(19, "Dimir Operative");
DIMIR_OPERATIVE(19, "Dimir Operative"),
OPEN_SEA_PALADIN(20, "Open Sea Paladin");

private final int value;
private final String displayName;
Expand Down
30 changes: 12 additions & 18 deletions app/src/main/res/layout/filter_grid_layout.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,25 +7,19 @@
android:layout_height="match_parent"
>

<HorizontalScrollView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:id="@+id/filter_scroll"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent"
>

<GridLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="@+id/filter_grid_layout"
android:orientation="horizontal"
android:useDefaultMargins="true"
android:layout_gravity="center"
>
</GridLayout>
<GridLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="@+id/filter_grid_layout"
android:orientation="horizontal"
android:useDefaultMargins="true"
android:layout_gravity="center"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent"
>
</GridLayout>

</HorizontalScrollView>

</androidx.constraintlayout.widget.ConstraintLayout>
6 changes: 4 additions & 2 deletions app/src/main/res/layout/item_filter_view.xml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
</data>

<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="wrap_content"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:id="@+id/item_filter_rl"
>
Expand All @@ -36,14 +36,16 @@
<TextView
style="@style/GeneralTextStyle"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_height="wrap_content"
android:id="@+id/item_filter_label"
android:background="@android:color/transparent"
android:text="@{context.getString(item.displayNameID)}"
android:textAlignment="viewStart"
android:textSize="18sp"
android:paddingStart="3dp"
android:scrollHorizontally="false"
app:layout_constraintStart_toEndOf="@id/item_filter_button"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintBottom_toBottomOf="parent"
/>
Expand Down
8 changes: 5 additions & 3 deletions app/src/main/res/layout/spell_window.xml
Original file line number Diff line number Diff line change
Expand Up @@ -102,10 +102,12 @@
android:background="@drawable/transparent_bg_bordered_button"
android:foreground="?android:attr/selectableItemBackground"
android:text="@string/cast"
android:textSize="@dimen/cast_button_text_size"
android:textColor="@android:color/black"
android:minWidth="9dp"
android:minHeight="9dp"
android:padding="9dp"
android:minWidth="@dimen/cast_button_vertical_padding"
android:minHeight="@dimen/cast_button_vertical_padding"
android:paddingVertical="@dimen/cast_button_vertical_padding"
android:paddingHorizontal="@dimen/cast_button_horizontal_padding"
app:layout_constraintStart_toStartOf="@id/known_button"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintBottom_toTopOf="@id/spell_description_prompt"
Expand Down
5 changes: 5 additions & 0 deletions app/src/main/res/values-pt/sizes.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<dimen name="cast_button_text_size">12sp</dimen>
<dimen name="cast_button_horizontal_padding">5dp</dimen>
</resources>
2 changes: 2 additions & 0 deletions app/src/main/res/values-pt/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -313,6 +313,7 @@
<string name="ftd_name">Tesouro dos Dragões de Fizban</string>
<string name="scc_name">Strixhaven: Um Currículo do Caos</string>
<string name="aag_name">Guia do Aventureiro Astral</string>
<string name="tdcsr_name">Cenário de Campanha Tal\'Dorei: Renascido</string>

<!-- Sourcebook codes -->
<string name="phb_code">LDJ</string>
Expand All @@ -327,6 +328,7 @@
<string name="ftd_code">TDF</string>
<string name="scc_code">SCC</string>
<string name="aag_code">GAA</string>
<string name="tdcsr_code">CCTDR</string>

<!-- Sort field names (that weren't already used elsewhere) -->
<string name="name">Nome</string>
Expand Down
4 changes: 4 additions & 0 deletions app/src/main/res/values/sizes.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,8 @@

<!-- Max edit text height for dialogs -->
<dimen name="dialog_edittext_max_height">175dp</dimen>

<dimen name="cast_button_text_size">14sp</dimen>
<dimen name="cast_button_horizontal_padding">9dp</dimen>
<dimen name="cast_button_vertical_padding">9dp</dimen>
</resources>
2 changes: 2 additions & 0 deletions app/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -314,6 +314,7 @@
<string name="ftd_name">Fizban\'s Treasury of Dragons</string>
<string name="scc_name">Strixhaven: A Curriculum of Chaos</string>
<string name="aag_name">Astral Adventurer\'s Guide</string>
<string name="tdcsr_name">Tal\'Dorei Campaign Setting Reborn</string>

<!-- Sourcebook codes -->
<string name="phb_code">PHB</string>
Expand All @@ -328,6 +329,7 @@
<string name="ftd_code">FTD</string>
<string name="scc_code">SCC</string>
<string name="aag_code">AAG</string>
<string name="tdcsr_code">TDCSR</string>

<!-- Sort field names (that weren't already used elsewhere) -->
<string name="name">Name</string>
Expand Down
68 changes: 68 additions & 0 deletions spells/TDCSR_spells.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
[
{
"casting_time": "1 action",
"classes": [
"Druid",
"Ranger",
"Sorcerer"
],
"components": [
"V",
"S",
"M"
],
"concentration": false,
"desc": "You conjure a deluge of seawater in a 15-foot-radius, 10-foot-tall cylinder centered on a point within range. This water takes the form of a tidal wave, a whirlpool, a waterspout, or another form of your choice. Each creature in the area must succeed on a Strength saving throw against your spell save DC or take 2d8 bludgeoning damage and fall prone. You can choose a number of creatures equal to your spellcasting modifier (minimum of 1) to automatically succeed on this saving throw.\n\nIf you are within the spell's area, as part of the action you use to cast the spell, you can vanish into the deluge and teleport to an unoccupied space that you can see within the spell's area.",
"duration": "Instantaneous",
"higher_level": "",
"id": 524,
"level": 3,
"material": "A strand of wet hair",
"name": "Freedom of the Waves",
"range": "120 feet",
"ritual": false,
"school": "Conjuration",
"subclasses": [
"Open Sea Paladin"
],
"locations": [
{
"sourcebook": "TDCSR",
"page": 176
}
]
},
{
"casting_time": "1 action",
"classes": [
"Druid",
"Ranger",
"Sorcerer"
],
"components": [
"V",
"S",
"M"
],
"concentration": true,
"desc": "Wind wraps around your body, tugging at your hair and clothing as your feet lift off the ground. You gain a flying speed of 60 feet. Additionally, you have advantage on ability checks to avoid being grappled, and on saving throws against being restrained or paralyzed.\n\nWhen you are targeted by a spell or attack while this spell is in effect, you can use a reaction to teleport up to 60 feet to an unoccupied space you can see. If this movement takes you out of range of the triggering spell or attack, you are unaffected by it. This spell then ends when you reappear.",
"duration": "Up to 10 minutes",
"higher_level": "",
"id": 525,
"level": 5,
"material": "A scrap of sailcloth",
"name": "Freedom of the Winds",
"range": "Self",
"ritual": false,
"school": "Abjuration",
"subclasses": [
"Open Sea Paladin"
],
"locations": [
{
"sourcebook": "TDCSR",
"page": 176
}
]
}
]
Loading

0 comments on commit ca2a18e

Please sign in to comment.