Skip to content

Commit a6309cc

Browse files
committed
some bug fixed.
1 parent b699a7b commit a6309cc

File tree

5 files changed

+46
-42
lines changed

5 files changed

+46
-42
lines changed

Diff for: src/model/cards/CardFactory.java

+27-27
Original file line numberDiff line numberDiff line change
@@ -429,7 +429,7 @@ private static void makeAllMinions() {
429429
trigger.getEffects().add(new HP(-1, Dispelablity.UNDISPELLABLE, -6));
430430
warrior.getTriggers().add(trigger);
431431

432-
warrior.description.descriptionOfCardSpecialAbility = "F";
432+
warrior.description.descriptionOfCardSpecialAbility = "Deals 6 damage to enemy Hero on death";
433433
allBuiltMinions.add(warrior);
434434
}
435435
{//
@@ -507,7 +507,7 @@ private static void makeAllSpells() {
507507
{//
508508
Spell spell = new Spell(16, "HellFire", 3, 600, false);
509509

510-
spell.getTriggers().add(new BurningCell(2,Dispelablity.BAD));
510+
spell.getTriggers().add(new BurningCell(2, Dispelablity.BAD));
511511
spell.getActions().put(new Applier(), new RectGetter(2, 2, true, false, false, false, false));
512512

513513
spell.description.targetType = "square 2*2";
@@ -643,7 +643,7 @@ private static void makeAllSpells() {
643643
{//
644644
Spell spell = new Spell(119, "KingsGaurd", 3, 1750, false);
645645

646-
spell.getActions().put(new Killer(), new RandomGetter((SpellTarget) new AdjacentGetter(new RectGetter(1,1,false,false,false,false,true))));
646+
spell.getActions().put(new Killer(), new RandomGetter((SpellTarget) new AdjacentGetter(new RectGetter(1, 1, false, false, false, false, true))));
647647

648648
spell.description.targetType = "random enemy minion around hero";
649649
spell.description.descriptionOfCardSpecialAbility = "killes enemy";
@@ -669,46 +669,46 @@ private static void makeAllHeroes() {
669669
aura.getEffects().add(new AP(1, Dispelablity.GOOD, 4));
670670
hero.getTriggers().add(aura);
671671

672-
hero.getEffects().add(new Melee(-1,Dispelablity.UNDISPELLABLE));
672+
hero.getEffects().add(new Melee(-1, Dispelablity.UNDISPELLABLE));
673673

674674
hero.description.descriptionOfCardSpecialAbility = "Apply power buff with 4 point additional attack damage on himself";
675675
allBuiltHeroes.add(hero);
676676
}
677677
{
678678
Hero hero = new Hero(32, "Simorgh", 9000, 50, 4, -1);
679679

680-
HeroPower spell = new HeroPower(0, "All_Stun", 5, 0, false,8);
680+
HeroPower spell = new HeroPower(0, "All_Stun", 5, 0, false, 8);
681681
spell.getActions().put(new Applier(), new AllWarriorsGetter(false, true));
682682
spell.getTriggers().add(new Stun(1, Dispelablity.BAD));
683683
hero.power = spell;
684684

685-
hero.getEffects().add(new Melee(-1,Dispelablity.UNDISPELLABLE));
685+
hero.getEffects().add(new Melee(-1, Dispelablity.UNDISPELLABLE));
686686

687687
hero.description.descriptionOfCardSpecialAbility = "Make 8 cell around firable and apply holy buff on himself for 2 round";
688688
allBuiltHeroes.add(hero);
689689
}
690690
{
691691
Hero hero = new Hero(33, "Ezhdeha-E-Haftsar", 8000, 50, 4, -1);
692692

693-
HeroPower spell = new HeroPower(0, "Disarm", 0, 0, false,1);
693+
HeroPower spell = new HeroPower(0, "Disarm", 0, 0, false, 1);
694694
spell.getActions().put(new Applier(), new RectGetter(1, 1, false, true, false, true, false));
695695
spell.getTriggers().add(new Disarm(1, Dispelablity.BAD));
696696
hero.power = spell;
697697

698-
hero.getEffects().add(new Melee(-1,Dispelablity.UNDISPELLABLE));
698+
hero.getEffects().add(new Melee(-1, Dispelablity.UNDISPELLABLE));
699699

700700
hero.description.descriptionOfCardSpecialAbility = "Disarm one person";
701701
allBuiltHeroes.add(hero);
702702
}
703703
{
704704
Hero hero = new Hero(34, "Rakhsh", 8000, 50, 4, -1);
705705

706-
HeroPower spell = new HeroPower(0, "Stunak", 1, 0, false,2);
706+
HeroPower spell = new HeroPower(0, "Stunak", 1, 0, false, 2);
707707
spell.getActions().put(new Applier(), new RectGetter(1, 1, false, true, false, true, false));
708708
spell.getTriggers().add(new Stun(1, Dispelablity.BAD));
709709
hero.power = spell;
710710

711-
hero.getEffects().add(new Melee(-1,Dispelablity.UNDISPELLABLE));
711+
hero.getEffects().add(new Melee(-1, Dispelablity.UNDISPELLABLE));
712712

713713
hero.description.descriptionOfCardSpecialAbility = "Stun one enemy for 1 round";
714714
allBuiltHeroes.add(hero);
@@ -722,7 +722,7 @@ private static void makeAllHeroes() {
722722
trigger.getTriggers().add(new Poisoned(3, Dispelablity.BAD));
723723
hero.getTriggers().add(trigger);
724724

725-
hero.getEffects().add(new Melee(-1,Dispelablity.UNDISPELLABLE));
725+
hero.getEffects().add(new Melee(-1, Dispelablity.UNDISPELLABLE));
726726

727727
hero.description.descriptionOfCardSpecialAbility = "Add 2 snakes with 1/1 randomly around himself";
728728
allBuiltHeroes.add(hero);
@@ -732,37 +732,37 @@ private static void makeAllHeroes() {
732732

733733
Trigger holyCell = new Mine(3, Dispelablity.GOOD);
734734
holyCell.getTriggers().add(new HolyBuff(1, Dispelablity.GOOD, 1));
735-
HeroPower spell = new HeroPower(0, "Holify", 1, 0, false,3);
735+
HeroPower spell = new HeroPower(0, "Holify", 1, 0, false, 3);
736736
spell.getActions().put(new Applier(), new RectGetter(1, 1, true, false, false, false, false));
737737
spell.getTriggers().add(holyCell);
738738
hero.power = spell;
739739

740-
hero.getEffects().add(new Melee(-1,Dispelablity.UNDISPELLABLE));
740+
hero.getEffects().add(new Melee(-1, Dispelablity.UNDISPELLABLE));
741741

742742
hero.description.descriptionOfCardSpecialAbility = "Make one cell saint for 3 turns";
743743
allBuiltHeroes.add(hero);
744744
}
745745
{
746746
Hero hero = new Hero(37, "Arash", 10000, 30, 2, -1);
747747

748-
HeroPower spell = new HeroPower(0, "Power_Shot", 2, 0, false,2);
749-
spell.getActions().put(new Applier(), new RectGetter(true,false, false, true, false, true, false));
748+
HeroPower spell = new HeroPower(0, "Power_Shot", 2, 0, false, 2);
749+
spell.getActions().put(new Applier(), new RectGetter(true, false, false, true, false, true, false));
750750
spell.getEffects().add(new HP(-1, Dispelablity.UNDISPELLABLE, -4));
751751
hero.power = spell;
752752

753-
hero.getEffects().add(new Ranged(-1,Dispelablity.UNDISPELLABLE,6));
753+
hero.getEffects().add(new Ranged(-1, Dispelablity.UNDISPELLABLE, 6));
754754

755755
hero.description.descriptionOfCardSpecialAbility = "Add 4 point to all minions in hero's row";
756756
allBuiltHeroes.add(hero);
757757
}
758758
{
759759
Hero hero = new Hero(38, "Afsane", 11000, 40, 3, -1);
760760

761-
HeroPower spell = new HeroPower(0, "Dispel_One", 1, 0, false,2);
761+
HeroPower spell = new HeroPower(0, "Dispel_One", 1, 0, false, 2);
762762
spell.getActions().put(new Dispeller(), new RectGetter(1, 1, false, true, false, true, false));
763763
hero.power = spell;
764764

765-
hero.getEffects().add(new Ranged(-1,Dispelablity.UNDISPELLABLE,3));
765+
hero.getEffects().add(new Ranged(-1, Dispelablity.UNDISPELLABLE, 3));
766766

767767
hero.description.descriptionOfCardSpecialAbility = "Dispel one enemy";
768768
allBuiltHeroes.add(hero);
@@ -774,17 +774,17 @@ private static void makeAllHeroes() {
774774
aura.getTriggers().add(new HolyBuff(1, Dispelablity.GOOD, 3));
775775
hero.getTriggers().add(aura);
776776

777-
hero.getEffects().add(new Melee(-1,Dispelablity.UNDISPELLABLE));
778-
hero.getEffects().add(new Ranged(-1,Dispelablity.UNDISPELLABLE,3));
777+
hero.getEffects().add(new Melee(-1, Dispelablity.UNDISPELLABLE));
778+
hero.getEffects().add(new Ranged(-1, Dispelablity.UNDISPELLABLE, 3));
779779

780780
hero.description.descriptionOfCardSpecialAbility = "Have 3 passive holy buff";
781781
allBuiltHeroes.add(hero);
782782
}
783783
{
784784
Hero hero = new Hero(310, "Rostam", 8000, 55, 7, -1);
785785

786-
hero.getEffects().add(new Melee(-1,Dispelablity.UNDISPELLABLE));
787-
hero.getEffects().add(new Ranged(-1,Dispelablity.UNDISPELLABLE,4));
786+
hero.getEffects().add(new Melee(-1, Dispelablity.UNDISPELLABLE));
787+
hero.getEffects().add(new Ranged(-1, Dispelablity.UNDISPELLABLE, 4));
788788

789789
hero.description.descriptionOfCardSpecialAbility = "None";
790790
allBuiltHeroes.add(hero);
@@ -882,7 +882,7 @@ protected void executeActions(GameState gameState, QualityHaver owner) {
882882
};
883883
manaPotion.getConditions().add(new HasTurnStarted());
884884
item.getTriggers().add(manaPotion);
885-
item.getActions().put(new Applier(),new HeroGetter(true));
885+
item.getActions().put(new Applier(), new HeroGetter(true));
886886

887887
item.description.descriptionOfCardSpecialAbility = "Increase Mana 3 units";
888888
allBuiltItems.add(item);
@@ -963,7 +963,7 @@ protected void executeActions(GameState gameState, QualityHaver owner) {
963963
}
964964
};
965965
manaRegen.getConditions().add(new HasTurnStarted());
966-
item.getActions().put(new Applier(),new RectGetter(1,1,false,false,false,false,true));
966+
item.getActions().put(new Applier(), new RectGetter(1, 1, false, false, false, false, true));
967967
item.getTriggers().add(manaRegen);
968968

969969
item.description.descriptionOfCardSpecialAbility = "Take one mana in each turn and killed enemy hero after 15 turn";
@@ -1092,12 +1092,12 @@ public static void main() {
10921092
cardAdder(allBuiltItems);
10931093
}
10941094

1095-
private static void addCounterAttack(){
1095+
private static void addCounterAttack() {
10961096
for (Card hero : allBuiltHeroes) {
1097-
hero.getTriggers().add(new CounterAttack(-1,Dispelablity.UNDISPELLABLE));
1097+
hero.getTriggers().add(new CounterAttack(-1, Dispelablity.UNDISPELLABLE));
10981098
}
10991099
for (Card minion : allBuiltMinions) {
1100-
minion.getTriggers().add(new CounterAttack(-1,Dispelablity.UNDISPELLABLE));
1100+
minion.getTriggers().add(new CounterAttack(-1, Dispelablity.UNDISPELLABLE));
11011101
}
11021102
}
11031103

Diff for: src/view/fxmlControllers/CustomCardController.java

-1
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,6 @@ public void apply_btn() {
120120

121121
//--------.: GETTERS :.---------
122122

123-
124123
public String getCardName() {
125124
return cardName_tf.getText();
126125
}

Diff for: src/view/fxmls/heroSpecialPower.fxml

+13-8
Original file line numberDiff line numberDiff line change
@@ -6,33 +6,38 @@
66
<?import javafx.scene.layout.Pane?>
77
<?import javafx.scene.text.Font?>
88

9-
<Pane maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefHeight="130.0" prefWidth="100.0" xmlns="http://javafx.com/javafx/11.0.1" xmlns:fx="http://javafx.com/fxml/1" fx:controller="view.fxmlControllers.HeroSpecialPowerSpriteController">
9+
<Pane maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefHeight="125.0" prefWidth="100.0" xmlns="http://javafx.com/javafx/11.0.1" xmlns:fx="http://javafx.com/fxml/1" fx:controller="view.fxmlControllers.HeroSpecialPowerSpriteController">
1010
<children>
11-
<ImageView fx:id="backGround" fitHeight="78.0" fitWidth="77.0" layoutX="12.0" layoutY="27.0">
11+
<ImageView fx:id="backGround" fitHeight="78.0" fitWidth="77.0" layoutX="12.0" layoutY="22.0">
1212
<image>
1313
<Image url="@../images/heroSpecialPower/grayCircle.png" />
1414
</image>
1515
</ImageView>
16-
<ImageView fitHeight="85.0" fitWidth="85.0" layoutX="8.0" layoutY="23.0">
16+
<ImageView fitHeight="85.0" fitWidth="85.0" layoutX="8.0" layoutY="18.0">
1717
<image>
1818
<Image url="@../images/heroSpecialPower/inactivePlayer.png" />
1919
</image>
2020
</ImageView>
21-
<Label fx:id="neededMana" alignment="CENTER" layoutX="35.0" layoutY="97.0" prefHeight="28.0" prefWidth="31.0" style="-fx-background-color: gray; -fx-background-radius: 15;" />
22-
<ImageView fx:id="manaBackGround" fitHeight="43.0" fitWidth="45.0" layoutX="28.0" layoutY="89.0">
21+
<Label alignment="CENTER" layoutX="35.0" layoutY="87.0" prefHeight="32.0" prefWidth="32.0" style="-fx-background-color: gray; -fx-background-radius: 20;" />
22+
<ImageView fx:id="manaBackGround" fitHeight="43.0" fitWidth="45.0" layoutX="29.0" layoutY="83.0">
2323
<image>
2424
<Image url="@../images/heroSpecialPower/grayMana.png" />
2525
</image>
2626
</ImageView>
27-
<ImageView fitHeight="43.0" fitWidth="64.0" layoutX="19.0" layoutY="2.0">
27+
<Label fx:id="neededMana" alignment="CENTER" layoutX="36.0" layoutY="87.0" prefHeight="32.0" prefWidth="32.0">
28+
<font>
29+
<Font size="15.0" />
30+
</font>
31+
</Label>
32+
<ImageView fitHeight="43.0" fitWidth="64.0" layoutX="19.0" layoutY="-3.0">
2833
<image>
2934
<Image url="@../images/heroSpecialPower/remainingTurn.png" />
3035
</image>
3136
</ImageView>
32-
<Label fx:id="remainedTurn" alignment="CENTER" layoutX="32.0" layoutY="6.0" prefHeight="34.0" prefWidth="37.0">
37+
<Label fx:id="remainedTurn" alignment="CENTER" layoutX="32.0" layoutY="1.0" prefHeight="34.0" prefWidth="37.0">
3338
<font>
3439
<Font size="15.0" />
3540
</font></Label>
36-
<Pane fx:id="gif" layoutX="1.0" layoutY="16.0" prefHeight="100.0" prefWidth="100.0" />
41+
<Pane fx:id="gif" layoutY="11.0" prefHeight="100.0" prefWidth="100.0" />
3742
</children>
3843
</Pane>

Diff for: src/view/fxmls/shownSpellInArena.fxml

+3-3
Original file line numberDiff line numberDiff line change
@@ -19,14 +19,14 @@
1919
<font>
2020
<Font size="11.0" />
2121
</font></Text>
22-
<ImageView fx:id="blueDot" fitHeight="44.0" fitWidth="45.0" layoutX="58.0" layoutY="118.0">
22+
<ImageView fx:id="blueDot" fitHeight="44.0" fitWidth="45.0" layoutX="58.0" layoutY="119.0">
2323
<image>
2424
<Image url="@../images/cardsbody/purpleDot.png" />
2525
</image>
2626
</ImageView>
27-
<Text fx:id="descriptionText" fill="#5954fc" layoutX="7.0" layoutY="163.0" strokeType="OUTSIDE" strokeWidth="0.0" text="Description" textAlignment="CENTER" wrappingWidth="150.0">
27+
<Text fx:id="descriptionText" fill="#5954fc" layoutX="15.0" layoutY="165.0" strokeType="OUTSIDE" strokeWidth="0.0" text="Description" textAlignment="CENTER" wrappingWidth="134.0">
2828
<font>
29-
<Font size="8.0" />
29+
<Font size="9.0" />
3030
</font>
3131
</Text>
3232
<Pane fx:id="gif" layoutX="30.0" layoutY="13.0" prefHeight="100.0" prefWidth="100.0" />

Diff for: src/view/fxmls/shownWarriorInArena.fxml

+3-3
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
</ImageView>
1717
<Text fx:id="apText" fill="WHITE" layoutX="22.0" layoutY="130.0" strokeType="OUTSIDE" strokeWidth="0.0" text="99" textAlignment="CENTER" wrappingWidth="36.0" />
1818
<Text fx:id="hpText" fill="WHITE" layoutX="105.0" layoutY="131.0" strokeType="OUTSIDE" strokeWidth="0.0" text="99" textAlignment="CENTER" wrappingWidth="29.44921875" />
19-
<ImageView fx:id="blueDot" fitHeight="35.0" fitWidth="36.0" layoutX="62.0" layoutY="127.0">
19+
<ImageView fx:id="blueDot" fitHeight="44.0" fitWidth="44.0" layoutX="58.0" layoutY="122.0">
2020
<image>
2121
<Image url="@../images/cardsbody/blueDot.png" />
2222
</image>
@@ -26,9 +26,9 @@
2626
<font>
2727
<Font size="10.0" />
2828
</font></Text>
29-
<Text fx:id="descriptionText" fill="#5954fc" layoutX="14.0" layoutY="167.0" strokeType="OUTSIDE" strokeWidth="0.0" text="Description" textAlignment="CENTER" wrappingWidth="132.0">
29+
<Text fx:id="descriptionText" fill="#5954fc" layoutX="17.0" layoutY="165.0" strokeType="OUTSIDE" strokeWidth="0.0" text="Description" textAlignment="CENTER" wrappingWidth="126.0">
3030
<font>
31-
<Font size="8.0" />
31+
<Font size="9.0" />
3232
</font>
3333
</Text>
3434
<Pane fx:id="gif" layoutX="30.0" layoutY="12.0" prefHeight="100.0" prefWidth="100.0" />

0 commit comments

Comments
 (0)