1
0
Fork 0

Started work on weapon cards

This commit is contained in:
Michaël Lemaire 2020-02-28 00:41:11 +01:00
parent ac13009d83
commit cb4ba03f99
19 changed files with 1479 additions and 46 deletions

View File

@ -5,7 +5,8 @@ class_name Anchor
export var selectable = false
export var selected = false
export(String, "normal", "attack_start", "defend_start") var anchor_type = "normal"
export(NodePath) var content
var content
func _process(delta):
if selected:
@ -18,6 +19,9 @@ func _process(delta):
func _ready():
add_to_group("anchors")
if not content and self.get_child_count() == 1:
set_content(self.get_child(0))
func is_connected_to(other: Anchor) -> bool:
for route in get_tree().get_nodes_in_group("routes"):
if route is Route and route.is_connecting(self, other):
@ -31,16 +35,14 @@ func set_content(val):
if old_parent.has_method("set_content"):
old_parent.set_content(null)
old_parent.remove_child(val)
self.add_child(val)
content = val.get_path()
if not get_children().has(val):
add_child(val)
content = val
else:
content = null
func get_content():
if content:
return get_node_or_null(content)
else:
return null
return content if content else null
func is_empty() -> bool:
return not get_content()
return not content

View File

@ -9,6 +9,7 @@ const BattleHelper = preload("res://helpers/battle.gd")
export var title = "Card" setget set_title
export(Texture) var portrait setget set_portrait
export(PackedScene) var spawned_unit setget set_spawned_unit
export var damage_dealt = 0 setget set_damage_dealt
var dragged = false
var base_position
@ -19,6 +20,7 @@ func _ready():
set_portrait(portrait)
set_title(title)
set_spawned_unit(spawned_unit)
set_damage_dealt(damage_dealt)
base_position = position
func get_size() -> Vector2:
@ -47,6 +49,15 @@ func set_spawned_unit(val):
else:
$points.visible = false
func set_damage_dealt(val):
damage_dealt = val
if has_node("damage"):
if damage_dealt:
$damage/value.text = String(damage_dealt)
$damage.visible = true
else:
$damage.visible = false
func set_hero(val: Node):
hero = val
@ -73,6 +84,11 @@ func play(anchor):
if spawned_unit:
unit = BattleHelper.spawn_unit(spawned_unit, anchor, hero.attacker if hero else false)
if damage_dealt:
var target = anchor.get_content()
if target and target.has_method("do_damage"):
target.do_damage(damage_dealt)
emit_signal("played", self, anchor, unit)
func return_to_base():

View File

@ -1,4 +1,4 @@
[gd_scene load_steps=8 format=2]
[gd_scene load_steps=9 format=2]
[ext_resource path="res://cards/base_card.png" type="Texture" id=1]
[ext_resource path="res://cards/base_card.gd" type="Script" id=2]
@ -6,6 +6,7 @@
[ext_resource path="res://theme/fonts/daggersquare.regular.otf" type="DynamicFontData" id=4]
[ext_resource path="res://helpers/drag.gd" type="Script" id=5]
[ext_resource path="res://units/points.tscn" type="PackedScene" id=6]
[ext_resource path="res://cards/damage.png" type="Texture" id=7]
[sub_resource type="DynamicFont" id=1]
size = 32
@ -43,6 +44,29 @@ position = Vector2( 130, 171 )
visible = false
position = Vector2( 130, 299 )
scale = Vector2( 0.75, 0.75 )
move = 0
hull = 0
shield = 0
damage = 0
enemy = false
[node name="damage" type="Sprite" parent="."]
visible = false
position = Vector2( 130, 299 )
scale = Vector2( 0.75, 0.75 )
texture = ExtResource( 7 )
[node name="value" type="Label" parent="damage"]
margin_left = 1.26668
margin_top = -24.0666
margin_right = 41.2667
margin_bottom = 24.9334
theme = ExtResource( 3 )
text = "1"
align = 1
__meta__ = {
"_edit_use_anchors_": false
}
[node name="drag" type="Control" parent="."]
margin_right = 260.0

BIN
cards/damage.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.0 KiB

34
cards/damage.png.import Normal file
View File

@ -0,0 +1,34 @@
[remap]
importer="texture"
type="StreamTexture"
path="res://.import/damage.png-3352fd8ab631efa2b7ccbb8d4b72932a.stex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://cards/damage.png"
dest_files=[ "res://.import/damage.png-3352fd8ab631efa2b7ccbb8d4b72932a.stex" ]
[params]
compress/mode=0
compress/lossy_quality=0.7
compress/hdr_mode=0
compress/bptc_ldr=0
compress/normal_map=0
flags/repeat=0
flags/filter=true
flags/mipmaps=false
flags/anisotropic=false
flags/srgb=2
process/fix_alpha_border=true
process/premult_alpha=false
process/HDR_as_SRGB=false
process/invert_color=false
stream=false
size_limit=0
detect_3d=true
svg/scale=1.0

217
cards/damage.svg Normal file
View File

@ -0,0 +1,217 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:xlink="http://www.w3.org/1999/xlink"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
width="300"
height="55"
viewBox="0 0 300 55.000002"
version="1.1"
id="svg3027"
inkscape:version="0.92.4 (f8dce91, 2019-08-02)"
sodipodi:docname="damage.svg"
inkscape:export-filename="/home/michael/workspace/perso/spacetac/cards/damage.png"
inkscape:export-xdpi="96"
inkscape:export-ydpi="96">
<defs
id="defs3021">
<filter
style="color-interpolation-filters:sRGB"
inkscape:label="Lightness-Contrast"
id="filter4994"
x="0"
y="0"
width="1"
height="1">
<feColorMatrix
values="0.6471 0 0 -0.0484441 0.17645 0 0.6471 0 -0.0484441 0.17645 0 0 0.6471 -0.0484441 0.17645 0 0 0 1 0"
id="feColorMatrix4992" />
</filter>
<filter
style="color-interpolation-filters:sRGB"
inkscape:label="Lightness-Contrast"
id="filter3603"
x="0"
y="0"
width="1"
height="1">
<feColorMatrix
values="0.6471 0 0 -0.0484441 0.17645 0 0.6471 0 -0.0484441 0.17645 0 0 0.6471 -0.0484441 0.17645 0 0 0 1 0"
id="feColorMatrix3601" />
</filter>
<filter
style="color-interpolation-filters:sRGB"
inkscape:label="Lightness-Contrast"
id="filter4970"
x="0"
y="0"
width="1"
height="1">
<feColorMatrix
values="0.7219 0 0 0.16114 0.13905 0 0.7219 0 0.16114 0.13905 0 0 0.7219 0.16114 0.13905 0 0 0 1 0"
id="feColorMatrix4968" />
</filter>
<filter
style="color-interpolation-filters:sRGB"
inkscape:label="Lightness-Contrast"
id="filter3609"
x="0"
y="0"
width="1"
height="1">
<feColorMatrix
values="0.6471 0 0 -0.0484441 0.17645 0 0.6471 0 -0.0484441 0.17645 0 0 0.6471 -0.0484441 0.17645 0 0 0 1 0"
id="feColorMatrix3607" />
</filter>
<filter
style="color-interpolation-filters:sRGB"
inkscape:label="Drop Shadow"
id="filter6876">
<feFlood
flood-opacity="0.498039"
flood-color="rgb(0,0,0)"
result="flood"
id="feFlood6866" />
<feComposite
in="flood"
in2="SourceGraphic"
operator="out"
result="composite1"
id="feComposite6868" />
<feGaussianBlur
in="composite1"
stdDeviation="14.4"
result="blur"
id="feGaussianBlur6870" />
<feOffset
dx="0"
dy="0"
result="offset"
id="feOffset6872" />
<feComposite
in="offset"
in2="SourceGraphic"
operator="atop"
result="composite2"
id="feComposite6874" />
</filter>
<linearGradient
inkscape:collect="always"
xlink:href="#linearGradient6601"
id="linearGradient6655"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(1.7621592,0,0,1.7621592,-3.120173,-30.243183)"
x1="58.778252"
y1="10.137365"
x2="42.521111"
y2="26.394508" />
<linearGradient
inkscape:collect="always"
id="linearGradient6601">
<stop
style="stop-color:#1d4f55;stop-opacity:1"
offset="0"
id="stop6597" />
<stop
style="stop-color:#0d2326;stop-opacity:0;"
offset="1"
id="stop6599" />
</linearGradient>
</defs>
<sodipodi:namedview
id="base"
pagecolor="#000000"
bordercolor="#666666"
borderopacity="1.0"
inkscape:pageopacity="0"
inkscape:pageshadow="2"
inkscape:zoom="2.8284271"
inkscape:cx="137.89341"
inkscape:cy="25.895865"
inkscape:document-units="px"
inkscape:current-layer="layer2"
showgrid="true"
units="px"
inkscape:window-width="1920"
inkscape:window-height="1056"
inkscape:window-x="0"
inkscape:window-y="22"
inkscape:window-maximized="0"
inkscape:snap-others="false"
showguides="false"
fit-margin-top="0"
fit-margin-left="0"
fit-margin-right="0"
fit-margin-bottom="0"
inkscape:snap-global="false">
<inkscape:grid
type="xygrid"
id="grid923" />
</sodipodi:namedview>
<metadata
id="metadata3024">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title />
</cc:Work>
</rdf:RDF>
</metadata>
<g
inkscape:groupmode="layer"
id="layer2"
inkscape:label="back"
transform="translate(41.952795,26.807916)">
<path
sodipodi:nodetypes="ccccccccc"
inkscape:connector-curvature="0"
id="path925"
d="m 57.047205,27.192084 -12,-25 v -3 l 12,-25 H 159.0472 l 12,25 v 3 l -12,25 z"
style="opacity:1;fill:#3a6479;fill-opacity:1;stroke:#dbeff9;stroke-width:2;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:9.29763794;stroke-opacity:1" />
<path
sodipodi:type="star"
style="opacity:1;fill:none;fill-opacity:1;stroke:#eab3ac;stroke-width:2.95353055;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
id="path9266"
sodipodi:sides="7"
sodipodi:cx="82.128059"
sodipodi:cy="1.3949898"
sodipodi:r1="10.841722"
sodipodi:r2="6.0713639"
sodipodi:arg1="-1.5707963"
sodipodi:arg2="-1.1219973"
inkscape:flatsided="false"
inkscape:rounded="0"
inkscape:randomized="0"
d="m 82.12806,-9.4467317 2.634266,5.3716119 5.842133,-1.2895929 -2.557257,5.40869743 4.650754,3.76351537 -5.823113,1.3729236 -0.04274,5.9826203 -4.704047,-3.6966902 -4.704047,3.6966892 -0.04274,-5.98262 -5.823114,-1.3729234 4.650755,-3.76351577 -2.557257,-5.40869703 5.842134,1.289593 z"
inkscape:transform-center-y="-2.7104304"
inkscape:transform-center-x="1.4195404e-05" />
</g>
<g
inkscape:groupmode="layer"
id="layer3"
inkscape:label="texts"
style="display:none"
transform="translate(41.952795,26.807916)">
<text
xml:space="preserve"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:39.37133026px;line-height:1.25;font-family:DAGGERSQUARE;-inkscape-font-specification:DAGGERSQUARE;letter-spacing:0px;word-spacing:0px;display:inline;fill:#dbeff9;fill-opacity:1;stroke:none;stroke-width:0.98428321"
x="106.34252"
y="8.9888268"
id="text3714"><tspan
sodipodi:role="line"
id="tspan3712"
x="106.34252"
y="8.9888268"
style="font-size:26.74382782px;fill:#dbeff9;fill-opacity:1;stroke-width:0.98428321">2</tspan></text>
</g>
</svg>

After

Width:  |  Height:  |  Size: 7.1 KiB

34
cards/damage.svg.import Normal file
View File

@ -0,0 +1,34 @@
[remap]
importer="texture"
type="StreamTexture"
path="res://.import/damage.svg-5bef143185717e9acb3627b0c36c69a2.stex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://cards/damage.svg"
dest_files=[ "res://.import/damage.svg-5bef143185717e9acb3627b0c36c69a2.stex" ]
[params]
compress/mode=0
compress/lossy_quality=0.7
compress/hdr_mode=0
compress/bptc_ldr=0
compress/normal_map=0
flags/repeat=0
flags/filter=true
flags/mipmaps=false
flags/anisotropic=false
flags/srgb=2
process/fix_alpha_border=true
process/premult_alpha=false
process/HDR_as_SRGB=false
process/invert_color=false
stream=false
size_limit=0
detect_3d=true
svg/scale=1.0

BIN
cards/weapons/gatling.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 62 KiB

View File

@ -0,0 +1,34 @@
[remap]
importer="texture"
type="StreamTexture"
path="res://.import/gatling.png-f06085be1d8034bbf73061f63324e83c.stex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://cards/weapons/gatling.png"
dest_files=[ "res://.import/gatling.png-f06085be1d8034bbf73061f63324e83c.stex" ]
[params]
compress/mode=0
compress/lossy_quality=0.7
compress/hdr_mode=0
compress/bptc_ldr=0
compress/normal_map=0
flags/repeat=0
flags/filter=true
flags/mipmaps=false
flags/anisotropic=false
flags/srgb=2
process/fix_alpha_border=true
process/premult_alpha=false
process/HDR_as_SRGB=false
process/invert_color=false
stream=false
size_limit=0
detect_3d=true
svg/scale=1.0

928
cards/weapons/gatling.svg Normal file
View File

@ -0,0 +1,928 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:xlink="http://www.w3.org/1999/xlink"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
width="256"
height="256"
id="svg2"
version="1.1"
inkscape:version="0.92.4 (f8dce91, 2019-08-02)"
sodipodi:docname="gatling.svg"
inkscape:export-filename="/home/michael/workspace/spacetac/cards/weapons/gatling.png"
inkscape:export-xdpi="96.000008"
inkscape:export-ydpi="96.000008"
viewBox="0 0 256 256"
style="enable-background:new">
<defs
id="defs4">
<inkscape:perspective
sodipodi:type="inkscape:persp3d"
inkscape:vp_x="-285.20807 : 290.6875 : 1"
inkscape:vp_y="0 : 2899.3743 : 0"
inkscape:vp_z="386.4453 : 307.04898 : 1"
inkscape:persp3d-origin="56.958863 : 158.74821 : 1"
id="perspective5014" />
<inkscape:perspective
sodipodi:type="inkscape:persp3d"
inkscape:vp_x="-276.44605 : 287.24918 : 1"
inkscape:vp_y="0 : 2558.8892 : 0"
inkscape:vp_z="395.69678 : 307.24918 : 1"
inkscape:persp3d-origin="70.380557 : 197.06482 : 1"
id="perspective4966" />
<inkscape:perspective
sodipodi:type="inkscape:persp3d"
inkscape:vp_x="-319.35659 : 289.28743 : 1"
inkscape:vp_y="0 : 1973.3019 : 0"
inkscape:vp_z="397.5958 : 310.62076 : 1"
inkscape:persp3d-origin="35.469705 : 176.84189 : 1"
id="perspective4947" />
<inkscape:perspective
sodipodi:type="inkscape:persp3d"
inkscape:vp_x="-284.28569 : 287.14285 : 1"
inkscape:vp_y="0 : 1849.9705 : 0"
inkscape:vp_z="387.85715 : 307.14285 : 1"
inkscape:persp3d-origin="48.363958 : 181.72516 : 1"
id="perspective4930" />
<inkscape:perspective
sodipodi:type="inkscape:persp3d"
inkscape:vp_x="-284.28569 : 287.14285 : 1"
inkscape:vp_y="0 : 1632.7211 : 0"
inkscape:vp_z="387.85715 : 307.14285 : 1"
inkscape:persp3d-origin="68.262246 : 192.25335 : 1"
id="perspective4928" />
<inkscape:perspective
sodipodi:type="inkscape:persp3d"
inkscape:vp_x="-284.83812 : 279.68508 : 1"
inkscape:vp_y="0 : 2398.9585 : 0"
inkscape:vp_z="387.30472 : 299.68508 : 1"
inkscape:persp3d-origin="69.033958 : 195.31714 : 1"
id="perspective5628" />
<inkscape:perspective
sodipodi:type="inkscape:persp3d"
inkscape:vp_x="-284.28569 : 287.14285 : 1"
inkscape:vp_y="0 : 2899.3743 : 0"
inkscape:vp_z="387.85715 : 307.14285 : 1"
inkscape:persp3d-origin="-9.2185935 : 200.37209 : 1"
id="perspective4726" />
<inkscape:perspective
sodipodi:type="inkscape:persp3d"
inkscape:vp_x="-284.28569 : 287.14285 : 1"
inkscape:vp_y="0 : 2718.1633 : 0"
inkscape:vp_z="387.85715 : 307.14285 : 1"
inkscape:persp3d-origin="38.567387 : 184.16579 : 1"
id="perspective4680" />
<pattern
inkscape:collect="always"
xlink:href="#pattern10688"
id="pattern10694"
patternTransform="matrix(7.0792381,0,0,7.2943536,-231.84785,-27.961366)" />
<pattern
inkscape:collect="always"
xlink:href="#Strips1_1white"
id="pattern10688"
patternTransform="matrix(10,0,0,10,2,0)" />
<pattern
inkscape:isstock="true"
inkscape:stockid="Stripes 1:1 white"
id="Strips1_1white"
patternTransform="translate(0,0) scale(10,10)"
height="1"
width="2"
patternUnits="userSpaceOnUse"
inkscape:collect="always">
<rect
id="rect8251"
height="2"
width="1"
y="-0.5"
x="0"
style="fill:white;stroke:none" />
</pattern>
<linearGradient
inkscape:collect="always"
id="linearGradient10525">
<stop
style="stop-color:#ff0000;stop-opacity:0"
offset="0"
id="stop10527" />
<stop
style="stop-color:#f86222;stop-opacity:1"
offset="1"
id="stop10529" />
</linearGradient>
<linearGradient
inkscape:collect="always"
id="linearGradient10423">
<stop
style="stop-color:#887119;stop-opacity:1"
offset="0"
id="stop10425" />
<stop
id="stop10431"
offset="0.42762059"
style="stop-color:#83a02b;stop-opacity:0.56862748" />
<stop
style="stop-color:#489843;stop-opacity:0;"
offset="1"
id="stop10427" />
</linearGradient>
<linearGradient
inkscape:collect="always"
id="linearGradient5844">
<stop
style="stop-color:#bcbcbc;stop-opacity:1;"
offset="0"
id="stop5846" />
<stop
id="stop6528"
offset="0.26181653"
style="stop-color:#d4d4d4;stop-opacity:1" />
<stop
style="stop-color:#595959;stop-opacity:1;"
offset="0.67535776"
id="stop6530" />
<stop
style="stop-color:#2a2a2a;stop-opacity:1"
offset="1"
id="stop5848" />
</linearGradient>
<linearGradient
inkscape:collect="always"
id="linearGradient5468">
<stop
style="stop-color:#fbe854;stop-opacity:1"
offset="0"
id="stop5470" />
<stop
id="stop5472"
offset="0.11726352"
style="stop-color:#b98850;stop-opacity:1" />
<stop
style="stop-color:#6d6d6d;stop-opacity:0;"
offset="1"
id="stop5474" />
</linearGradient>
<clipPath
clipPathUnits="userSpaceOnUse"
id="clipPath3925">
<path
style="fill:#40686f;fill-opacity:0.37542665;stroke:#68a3ad;stroke-width:0.5;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
d="m 343.37404,232.575 v 280 h 280 v -280 z m 240.65625,13.34375 10.625,10.59375 -106.09375,106.0625 105.5,105.5 -10.59375,10.59375 -105.5,-105.46875 -98.40625,98.40625 -10.625,-10.59375 98.4375,-98.4375 -99,-99 10.59375,-10.59375 99,99 z"
id="path3927"
inkscape:connector-curvature="0" />
</clipPath>
<linearGradient
inkscape:collect="always"
xlink:href="#linearGradient5844"
id="linearGradient6538"
x1="93.53553"
y1="107.1656"
x2="93.53553"
y2="148.70813"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(1.4476343,0,0,1.4476343,-81.750237,-57.297196)" />
<linearGradient
inkscape:collect="always"
xlink:href="#linearGradient10423"
id="linearGradient10429"
x1="87.630737"
y1="128.00002"
x2="239.40616"
y2="128.00002"
gradientUnits="userSpaceOnUse" />
<filter
inkscape:collect="always"
style="color-interpolation-filters:sRGB"
id="filter10513"
x="-0.17241065"
width="1.3448213"
y="-0.5030039"
height="2.0060079">
<feGaussianBlur
inkscape:collect="always"
stdDeviation="10.903208"
id="feGaussianBlur10515" />
</filter>
<linearGradient
inkscape:collect="always"
xlink:href="#linearGradient10525"
id="linearGradient10531"
x1="48.48732"
y1="128.08945"
x2="64.649765"
y2="128.08945"
gradientUnits="userSpaceOnUse"
gradientTransform="translate(2.0203051,-0.50507623)" />
<filter
inkscape:collect="always"
style="color-interpolation-filters:sRGB"
id="filter10557"
x="-0.37457809"
width="1.7491562"
y="-0.099473029"
height="1.1989461">
<feGaussianBlur
inkscape:collect="always"
stdDeviation="2.5225404"
id="feGaussianBlur10559" />
</filter>
<mask
maskUnits="userSpaceOnUse"
id="mask4579">
<g
id="g4581"
transform="translate(-31.785717,-23.928572)">
<circle
r="53.033009"
cy="-141.63815"
cx="132.83505"
id="circle4583"
style="opacity:1;fill:none;fill-opacity:1;fill-rule:evenodd;stroke:#ffffff;stroke-width:4.30000019;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
<path
sodipodi:nodetypes="cccccccc"
inkscape:connector-curvature="0"
id="path4585"
d="m 112.85714,-206.20927 h 55.35714 l -19.28571,50.71429 h 38.92857 l -73.92857,92.85714 21.42857,-69.28571 H 98.928572 Z"
style="fill:#ffffff;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:3.5999999;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
</g>
</mask>
<mask
maskUnits="userSpaceOnUse"
id="mask10690">
<rect
style="opacity:1;fill:url(#pattern10694);fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:10.39999962;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:0"
id="rect10692"
width="163.8338"
height="168.81219"
x="-227.39804"
y="-205.73518"
transform="rotate(90)" />
</mask>
<filter
x="-0.25"
width="1.5"
y="-0.40000001"
height="1.8"
inkscape:menu="Non realistic 3D shaders"
inkscape:menu-tooltip="Satiny metal surface effect"
inkscape:label="Brushed Metal"
style="color-interpolation-filters:sRGB"
id="filter5071">
<feGaussianBlur
in="SourceGraphic"
stdDeviation="5"
result="result8"
id="feGaussianBlur5053" />
<feComposite
in2="result8"
operator="xor"
result="result19"
id="feComposite5055" />
<feComposite
k4="0"
k3="0"
k1="0"
k2="1"
operator="arithmetic"
result="result17"
in2="result8"
id="feComposite5057" />
<feOffset
result="result18"
in="result8"
id="feOffset5059" />
<feDisplacementMap
in2="result17"
in="result18"
xChannelSelector="A"
yChannelSelector="A"
scale="100"
result="result4"
id="feDisplacementMap5061" />
<feComposite
k4="0"
k2="0"
in2="result4"
result="result2"
operator="arithmetic"
in="SourceGraphic"
k1="0"
k3="1"
id="feComposite5063" />
<feComposite
in2="SourceGraphic"
result="fbSourceGraphic"
in="result2"
operator="in"
id="feComposite5065" />
<feComposite
in2="SourceGraphic"
operator="in"
result="result15"
id="feComposite5067" />
<feComposite
result="result16"
in2="SourceGraphic"
operator="in"
in="result15"
id="feComposite5069" />
</filter>
<filter
x="-0.25"
width="1.5"
y="-0.40000001"
height="1.8"
inkscape:menu="Non realistic 3D shaders"
inkscape:menu-tooltip="Satiny metal surface effect"
inkscape:label="Brushed Metal"
style="color-interpolation-filters:sRGB"
id="filter5111">
<feGaussianBlur
in="SourceGraphic"
stdDeviation="5"
result="result8"
id="feGaussianBlur5093" />
<feComposite
in2="result8"
operator="xor"
result="result19"
id="feComposite5095" />
<feComposite
k4="0"
k3="0"
k1="0"
k2="1"
operator="arithmetic"
result="result17"
in2="result8"
id="feComposite5097" />
<feOffset
result="result18"
in="result8"
id="feOffset5099" />
<feDisplacementMap
in2="result17"
in="result18"
xChannelSelector="A"
yChannelSelector="A"
scale="100"
result="result4"
id="feDisplacementMap5101" />
<feComposite
k4="0"
k2="0"
in2="result4"
result="result2"
operator="arithmetic"
in="SourceGraphic"
k1="0"
k3="1"
id="feComposite5103" />
<feComposite
in2="SourceGraphic"
result="fbSourceGraphic"
in="result2"
operator="in"
id="feComposite5105" />
<feComposite
in2="SourceGraphic"
operator="in"
result="result15"
id="feComposite5107" />
<feComposite
result="result16"
in2="SourceGraphic"
operator="in"
in="result15"
id="feComposite5109" />
</filter>
<filter
style="color-interpolation-filters:sRGB"
inkscape:label="Drop Shadow"
id="filter5094">
<feFlood
flood-opacity="0.690196"
flood-color="rgb(255,255,255)"
result="flood"
id="feFlood5084" />
<feComposite
in="flood"
in2="SourceGraphic"
operator="in"
result="composite1"
id="feComposite5086" />
<feGaussianBlur
in="composite1"
stdDeviation="3.9"
result="blur"
id="feGaussianBlur5088" />
<feOffset
dx="0"
dy="0"
result="offset"
id="feOffset5090" />
<feComposite
in="SourceGraphic"
in2="offset"
operator="over"
result="composite2"
id="feComposite5092" />
</filter>
<filter
inkscape:label="Ridged Border"
inkscape:menu="Bevels"
inkscape:menu-tooltip="Ridged border with inner bevel"
style="color-interpolation-filters:sRGB"
id="filter6111">
<feMorphology
radius="4.3"
in="SourceAlpha"
result="result91"
id="feMorphology6097" />
<feComposite
operator="out"
in="SourceGraphic"
in2="result91"
id="feComposite6099" />
<feGaussianBlur
result="result0"
stdDeviation="1.2"
id="feGaussianBlur6101" />
<feDiffuseLighting
diffuseConstant="1"
id="feDiffuseLighting6105">
<feDistantLight
elevation="66"
azimuth="225"
id="feDistantLight6103" />
</feDiffuseLighting>
<feBlend
mode="multiply"
in2="SourceGraphic"
id="feBlend6107" />
<feComposite
operator="in"
in2="SourceAlpha"
id="feComposite6109" />
</filter>
<filter
inkscape:label="Matte Bevel"
inkscape:menu="Bevels"
inkscape:menu-tooltip="Soft, pastel-colored, blurry bevel"
x="-0.25"
y="-0.25"
width="1.5"
height="1.5"
style="color-interpolation-filters:sRGB"
id="filter6209">
<feGaussianBlur
stdDeviation="1"
result="result6"
id="feGaussianBlur6185" />
<feComposite
operator="in"
in="result6"
in2="result6"
result="result7"
id="feComposite6187" />
<feGaussianBlur
stdDeviation="8"
result="result3"
in="result7"
id="feGaussianBlur6189" />
<feComposite
in2="result7"
operator="over"
result="result91"
id="feComposite6191" />
<feComposite
operator="in"
in="result3"
result="result5"
in2="result91"
id="feComposite6193" />
<feColorMatrix
values="0 0 0 -1 0 0 0 0 -1 0 0 0 0 -1 0 0 0 0 1 0 "
result="result4"
id="feColorMatrix6195" />
<feSpecularLighting
surfaceScale="3"
specularConstant="2"
specularExponent="45"
in="result4"
result="result11"
id="feSpecularLighting6199">
<fePointLight
x="-5000"
y="-10000"
z="20000"
id="fePointLight6197" />
</feSpecularLighting>
<feComposite
operator="arithmetic"
k1="1"
in2="result4"
result="result10"
id="feComposite6201"
k2="0"
k3="0"
k4="0" />
<feComposite
operator="arithmetic"
k2="0.5"
k3="1"
in="result5"
result="result8"
in2="result10"
id="feComposite6203"
k1="0"
k4="0" />
<feComposite
result="result9"
in2="result8"
id="feComposite6205" />
<feBlend
mode="normal"
in2="result9"
id="feBlend6207" />
</filter>
<filter
inkscape:label="Neon"
inkscape:menu="Bevels"
inkscape:menu-tooltip="Neon light effect"
x="-0.25"
y="-0.25"
width="1.5"
height="1.5"
style="color-interpolation-filters:sRGB"
id="filter6233">
<feGaussianBlur
stdDeviation="1"
result="result1"
id="feGaussianBlur6211" />
<feComposite
in="result1"
in2="result1"
result="result4"
operator="in"
id="feComposite6213" />
<feGaussianBlur
stdDeviation="7"
result="result6"
in="result4"
id="feGaussianBlur6215" />
<feComposite
operator="over"
in="result6"
in2="result4"
result="result8"
id="feComposite6217" />
<feComposite
operator="in"
result="fbSourceGraphic"
in="result6"
in2="result8"
id="feComposite6219" />
<feSpecularLighting
specularExponent="45"
specularConstant="2"
surfaceScale="2.5"
lighting-color="#ffffff"
result="result1"
in="fbSourceGraphic"
id="feSpecularLighting6223">
<fePointLight
z="20000"
y="-10000"
x="-5000"
id="fePointLight6221" />
</feSpecularLighting>
<feComposite
operator="in"
result="result2"
in="result1"
in2="fbSourceGraphic"
id="feComposite6225" />
<feComposite
k3="1.5"
k2="1.2"
operator="arithmetic"
result="result4"
in="fbSourceGraphic"
in2="result2"
id="feComposite6227"
k1="0"
k4="0" />
<feComposite
operator="over"
in2="result4"
result="result9"
id="feComposite6229" />
<feBlend
mode="screen"
in2="result9"
id="feBlend6231" />
</filter>
<linearGradient
inkscape:collect="always"
xlink:href="#linearGradient5468"
id="linearGradient5187"
gradientUnits="userSpaceOnUse"
gradientTransform="translate(-10)"
x1="169.07599"
y1="113.24746"
x2="108.23768"
y2="113.18433" />
<linearGradient
inkscape:collect="always"
xlink:href="#linearGradient5844"
id="linearGradient5189"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(1.4476343,0,0,1.4476343,-81.750237,-57.297196)"
x1="37.20599"
y1="110.42603"
x2="37.20599"
y2="116.76176" />
<clipPath
clipPathUnits="userSpaceOnUse"
id="clipPath2202">
<g
transform="translate(1e-5,1.9e-5)"
id="use2204">
<path
d="M 243.73135,127.99998 A 115.73135,115.73135 0 0 1 198.51,219.7719 L 128,127.99998 Z"
sodipodi:end="0.91567459"
sodipodi:start="0"
sodipodi:ry="115.73135"
sodipodi:rx="115.73135"
sodipodi:cy="127.99998"
sodipodi:cx="128"
sodipodi:type="arc"
id="path2127"
style="display:inline;fill:#ffffff;fill-opacity:0.98823529;fill-rule:evenodd;stroke:none;stroke-width:12.91537094;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;enable-background:new" />
<path
d="M 290.58258,-46.85125 A 115.73135,115.73135 0 0 1 245.36122,44.920678 L 174.85123,-46.85125 Z"
sodipodi:end="0.91567459"
sodipodi:start="0"
sodipodi:ry="115.73135"
sodipodi:rx="115.73135"
sodipodi:cy="-46.85125"
sodipodi:cx="174.85123"
sodipodi:type="arc"
id="use2129"
style="display:inline;fill:#ffffff;fill-opacity:0.98823529;fill-rule:evenodd;stroke:none;stroke-width:12.91537094;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;enable-background:new"
transform="rotate(60)" />
<path
d="m 162.5826,-174.85123 a 115.73135,115.73135 0 0 1 -45.22136,91.771931 L 46.851242,-174.85123 Z"
sodipodi:end="0.91567459"
sodipodi:start="0"
sodipodi:ry="115.73135"
sodipodi:rx="115.73135"
sodipodi:cy="-174.85123"
sodipodi:cx="46.851242"
sodipodi:type="arc"
id="use2131"
style="display:inline;fill:#ffffff;fill-opacity:0.98823529;fill-rule:evenodd;stroke:none;stroke-width:12.91537094;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;enable-background:new"
transform="rotate(120)" />
<path
d="m -12.268623,-127.99996 a 115.73135,115.73135 0 0 1 -45.221358,91.771925 l -70.509999,-91.771925 z"
sodipodi:end="0.91567459"
sodipodi:start="0"
sodipodi:ry="115.73135"
sodipodi:rx="115.73135"
sodipodi:cy="-127.99996"
sodipodi:cx="-127.99998"
sodipodi:type="arc"
id="use2133"
style="display:inline;fill:#ffffff;fill-opacity:0.98823529;fill-rule:evenodd;stroke:none;stroke-width:12.91537094;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;enable-background:new"
transform="scale(-1)" />
<path
d="M -59.119858,46.851265 A 115.73135,115.73135 0 0 1 -104.34122,138.62319 L -174.85121,46.851265 Z"
sodipodi:end="0.91567459"
sodipodi:start="0"
sodipodi:ry="115.73135"
sodipodi:rx="115.73135"
sodipodi:cy="46.851265"
sodipodi:cx="-174.85121"
sodipodi:type="arc"
id="use2135"
style="display:inline;fill:#ffffff;fill-opacity:0.98823529;fill-rule:evenodd;stroke:none;stroke-width:12.91537094;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;enable-background:new"
transform="rotate(-120)" />
<path
d="M 68.880135,174.85124 A 115.73135,115.73135 0 0 1 23.658777,266.62317 L -46.851219,174.85124 Z"
sodipodi:end="0.91567459"
sodipodi:start="0"
sodipodi:ry="115.73135"
sodipodi:rx="115.73135"
sodipodi:cy="174.85124"
sodipodi:cx="-46.851219"
sodipodi:type="arc"
id="use2137"
style="display:inline;fill:#ffffff;fill-opacity:0.98823529;fill-rule:evenodd;stroke:none;stroke-width:12.91537094;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;enable-background:new"
transform="rotate(-60)" />
<circle
r="45.255562"
cy="127.99998"
cx="127.99998"
id="circle2139"
style="opacity:0.53299997;fill:#8d9d9d;fill-opacity:0.98823529;stroke:none;stroke-width:1;stroke-linejoin:bevel;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:0.22985074" />
</g>
</clipPath>
</defs>
<sodipodi:namedview
id="base"
pagecolor="#232323"
bordercolor="#666666"
borderopacity="1.0"
inkscape:pageopacity="0"
inkscape:pageshadow="2"
inkscape:zoom="0.90509672"
inkscape:cx="-98.273944"
inkscape:cy="34.102027"
inkscape:document-units="px"
inkscape:current-layer="layer3"
showgrid="false"
inkscape:window-width="1920"
inkscape:window-height="1056"
inkscape:window-x="0"
inkscape:window-y="22"
inkscape:window-maximized="0"
inkscape:snap-global="false"
inkscape:snap-bbox="true"
inkscape:snap-nodes="true"
inkscape:snap-bbox-midpoints="true"
units="px"
inkscape:snap-object-midpoints="true"
showguides="false"
inkscape:snap-others="true"
inkscape:snap-grids="false"
inkscape:snap-to-guides="true"
inkscape:object-paths="true"
inkscape:snap-center="true">
<inkscape:grid
type="xygrid"
id="grid3004"
originx="0"
originy="0"
spacingx="1"
spacingy="1" />
</sodipodi:namedview>
<metadata
id="metadata7">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title></dc:title>
</cc:Work>
</rdf:RDF>
</metadata>
<g
inkscape:groupmode="layer"
id="layer3"
inkscape:label="GatlingGun"
style="display:inline"
transform="translate(0,-17.066682)">
<g
id="g10561"
transform="matrix(0.72068912,-0.72068912,0.72068912,0.72068912,-79.281576,168.53478)">
<rect
transform="matrix(1.4476343,0,0,1.4476343,-81.750237,-57.297196)"
ry="5.5"
y="101.98858"
x="87.630737"
height="52.022854"
width="151.77542"
id="rect10421"
style="opacity:0.61100003;fill:url(#linearGradient10429);fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:10.39999962;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:0;filter:url(#filter10513)" />
<use
height="100%"
width="100%"
transform="translate(178.29499)"
id="use6554"
xlink:href="#g4509"
y="0"
x="0" />
<g
transform="matrix(3.123757,0,0,1.4476343,-336.21366,-57.245494)"
id="g4509">
<path
inkscape:connector-curvature="0"
id="rect4507"
d="m 98.214287,111.35714 h 61.071423 v 4.28571 H 98.214287 Z"
style="opacity:1;fill:url(#linearGradient5187);fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:10.39999962;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:0" />
</g>
<rect
y="102.40788"
x="-108.11786"
height="9.3062201"
width="172.6821"
id="rect4497"
style="opacity:1;fill:url(#linearGradient5189);fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:3.5999999;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
<use
height="100%"
width="100%"
transform="translate(222.86872,13.959321)"
id="use6556"
xlink:href="#g4509"
y="0"
x="0" />
<use
height="100%"
width="100%"
transform="translate(44.573743,13.959321)"
id="use4512"
xlink:href="#g4509"
y="0"
x="0" />
<use
height="100%"
width="100%"
transform="translate(4.5218589e-7,13.959321)"
id="use4499"
xlink:href="#rect4497"
y="0"
x="0" />
<use
height="100%"
width="100%"
transform="translate(267.44249,27.918659)"
id="use6562"
xlink:href="#g4509"
y="0"
x="0" />
<use
height="100%"
width="100%"
transform="translate(89.14749,27.918659)"
id="use4514"
xlink:href="#g4509"
y="0"
x="0" />
<use
height="100%"
width="100%"
transform="translate(4.5218589e-7,27.918659)"
id="use4501"
xlink:href="#rect4497"
y="0"
x="0" />
<use
height="100%"
width="100%"
transform="translate(133.72123,41.82629)"
id="use4518"
xlink:href="#g4509"
y="0"
x="0" />
<use
height="100%"
width="100%"
transform="translate(-44.573742,41.82629)"
id="use4516"
xlink:href="#g4509"
y="0"
x="0" />
<use
height="100%"
width="100%"
transform="translate(4.5218589e-7,41.877992)"
id="use4503"
xlink:href="#rect4497"
y="0"
x="0" />
<rect
y="97.754784"
x="48.53685"
height="60.490433"
width="9.306221"
id="rect4505"
style="opacity:1;fill:url(#linearGradient6538);fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:3.5999999;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
<use
height="100%"
width="100%"
transform="translate(312.01622,41.82629)"
id="use6572"
xlink:href="#g4509"
y="0"
x="0" />
<rect
y="97.153519"
x="50.507626"
height="60.861691"
width="16.162443"
id="rect10523"
style="opacity:0.406;fill:url(#linearGradient10531);fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:10.39999962;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:0;filter:url(#filter10557)" />
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 29 KiB

View File

@ -0,0 +1,34 @@
[remap]
importer="texture"
type="StreamTexture"
path="res://.import/gatling.svg-9eb48f3b5b8778c8c99b3fcf328890a7.stex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://cards/weapons/gatling.svg"
dest_files=[ "res://.import/gatling.svg-9eb48f3b5b8778c8c99b3fcf328890a7.stex" ]
[params]
compress/mode=0
compress/lossy_quality=0.7
compress/hdr_mode=0
compress/bptc_ldr=0
compress/normal_map=0
flags/repeat=0
flags/filter=true
flags/mipmaps=false
flags/anisotropic=false
flags/srgb=2
process/fix_alpha_border=true
process/premult_alpha=false
process/HDR_as_SRGB=false
process/invert_color=false
stream=false
size_limit=0
detect_3d=true
svg/scale=1.0

View File

@ -0,0 +1,21 @@
[gd_scene load_steps=3 format=2]
[ext_resource path="res://cards/base_card.tscn" type="PackedScene" id=1]
[ext_resource path="res://cards/weapons/gatling.png" type="Texture" id=2]
[node name="card" instance=ExtResource( 1 )]
title = "Gatling Gun"
portrait = ExtResource( 2 )
damage_dealt = 3
[node name="title" parent="." index="1"]
text = "Gatling Gun"
[node name="portrait" parent="." index="2"]
texture = ExtResource( 2 )
[node name="damage" parent="." index="4"]
visible = true
[node name="value" parent="damage" index="0"]
text = "3"

View File

@ -1,4 +1,4 @@
[gd_scene load_steps=10 format=2]
[gd_scene load_steps=11 format=2]
[ext_resource path="res://cards/spawns/spawn_trapper.tscn" type="PackedScene" id=1]
[ext_resource path="res://cards/spawns/spawn_xander.tscn" type="PackedScene" id=2]
@ -9,31 +9,35 @@
[ext_resource path="res://cards/spawns/spawn_avenger.tscn" type="PackedScene" id=7]
[ext_resource path="res://cards/spawns/spawn_commodore.tscn" type="PackedScene" id=8]
[ext_resource path="res://cards/spawns/spawn_creeper.tscn" type="PackedScene" id=9]
[ext_resource path="res://cards/weapons/gatling.tscn" type="PackedScene" id=10]
[node name="deck" type="Node2D"]
[node name="spawn_avenger" parent="." instance=ExtResource( 7 )]
[node name="spawn_breeze" parent="." instance=ExtResource( 3 )]
position = Vector2( 270, 0 )
position = Vector2( 272, 0 )
[node name="spawn_commorode" parent="." instance=ExtResource( 8 )]
position = Vector2( 540, 0 )
position = Vector2( 544, 0 )
[node name="spawn_creeper" parent="." instance=ExtResource( 9 )]
position = Vector2( 810, 0 )
position = Vector2( 816, 0 )
[node name="spawn_falcon" parent="." instance=ExtResource( 6 )]
position = Vector2( 0, 330 )
position = Vector2( 0, 336 )
[node name="spawn_flea" parent="." instance=ExtResource( 5 )]
position = Vector2( 270, 330 )
position = Vector2( 272, 336 )
[node name="spawn_jumper" parent="." instance=ExtResource( 4 )]
position = Vector2( 540, 330 )
position = Vector2( 544, 336 )
[node name="spawn_trapper" parent="." instance=ExtResource( 1 )]
position = Vector2( 810, 330 )
position = Vector2( 816, 336 )
[node name="spawn_xander" parent="." instance=ExtResource( 2 )]
position = Vector2( 0, 660 )
position = Vector2( 0, 672 )
[node name="card" parent="." instance=ExtResource( 10 )]
position = Vector2( 272, 672 )

View File

@ -4,5 +4,5 @@ static func set_parent(node: Node, parent: Node):
var old_parent = node.get_parent()
if old_parent and old_parent != parent:
old_parent.remove_child(node)
parent.add_child(node)

View File

@ -12,7 +12,7 @@
[ext_resource path="res://units/heroes/tomahawk.tscn" type="PackedScene" id=10]
[ext_resource path="res://units/heroes/rhino.tscn" type="PackedScene" id=11]
[sub_resource type="GDScript" id=2]
[sub_resource type="GDScript" id=1]
script/source = "extends Polygon2D
func start(text):
@ -20,8 +20,7 @@ func start(text):
$anim.play(\"show\")
"
[sub_resource type="Animation" id=1]
resource_name = "show"
[sub_resource type="Animation" id=2]
length = 1.5
tracks/0/type = "value"
tracks/0/path = NodePath(".:position")
@ -124,16 +123,26 @@ __meta__ = {
[node name="attacker_points" parent="combat_info" instance=ExtResource( 7 )]
position = Vector2( 260, -167.5 )
move = 0
hull = 0
shield = 0
damage = 0
enemy = false
[node name="defender_points" parent="combat_info" instance=ExtResource( 7 )]
position = Vector2( 840, -167.5 )
move = 0
hull = 0
shield = 0
damage = 0
enemy = false
[node name="turn_indicator" type="Polygon2D" parent="."]
position = Vector2( 170, 80 )
z_index = 50
color = Color( 0.227451, 0.392157, 0.47451, 1 )
polygon = PoolVector2Array( -570, 980, -470, 780, 1420, 780, 1320, 980 )
script = SubResource( 2 )
script = SubResource( 1 )
__meta__ = {
"_edit_group_": true
}
@ -155,7 +164,7 @@ __meta__ = {
}
[node name="anim" type="AnimationPlayer" parent="turn_indicator"]
anims/show = SubResource( 1 )
anims/show = SubResource( 2 )
[connection signal="unit_created" from="hand_attack" to="." method="_on_unit_created"]
[connection signal="pressed" from="hand_attack/skip" to="hand_attack" method="emit_turn_end"]
[connection signal="unit_created" from="hand_defend" to="." method="_on_unit_created"]

View File

@ -1,23 +1,103 @@
[gd_scene load_steps=6 format=2]
[gd_scene load_steps=10 format=2]
[ext_resource path="res://screens/battle/hand.gd" type="Script" id=1]
[ext_resource path="res://arenas/anchor.tscn" type="PackedScene" id=2]
[ext_resource path="res://cards/spawns/spawn_breeze.tscn" type="PackedScene" id=3]
[ext_resource path="res://theme/ui.tres" type="Theme" id=4]
[ext_resource path="res://arenas/route.tscn" type="PackedScene" id=5]
[ext_resource path="res://units/heroes/tomahawk.tscn" type="PackedScene" id=6]
[ext_resource path="res://cards/weapons/gatling.tscn" type="PackedScene" id=7]
[ext_resource path="res://units/basic/avenger.tscn" type="PackedScene" id=8]
[sub_resource type="GDScript" id=1]
script/source = "extends Node2D
func _ready():
$hand.add_card($card)
$card_unit.set_hero($arena1/anchor3/hero)
$hand.add_card($card_unit)
$card_weapon.set_hero($arena2/anchor1/hero)
$hand.add_card($card_weapon)
$hand.rearrange()
"
[node name="Node2D" type="Node2D"]
script = SubResource( 1 )
[node name="anchor" parent="." instance=ExtResource( 2 )]
position = Vector2( 570, 900 )
[node name="arena1" type="Node2D" parent="."]
[node name="help" type="Label" parent="arena1"]
margin_left = 8.0
margin_top = 360.0
margin_right = 1080.0
margin_bottom = 409.0
theme = ExtResource( 4 )
text = "Units can be deployed next to the hero unit"
align = 1
__meta__ = {
"_edit_use_anchors_": false
}
[node name="route1" parent="arena1" instance=ExtResource( 5 )]
points = PoolVector2Array( 192, 192, 552, 192 )
start = NodePath("../anchor1")
end = NodePath("../anchor2")
[node name="route2" parent="arena1" instance=ExtResource( 5 )]
points = PoolVector2Array( 552, 192, 896, 192 )
start = NodePath("../anchor2")
end = NodePath("../anchor3")
[node name="anchor1" parent="arena1" instance=ExtResource( 2 )]
position = Vector2( 192, 192 )
[node name="anchor2" parent="arena1" instance=ExtResource( 2 )]
position = Vector2( 552, 192 )
[node name="anchor3" parent="arena1" instance=ExtResource( 2 )]
position = Vector2( 896, 192 )
[node name="hero" parent="arena1/anchor3" instance=ExtResource( 6 )]
attacker = true
[node name="arena2" type="Node2D" parent="."]
[node name="help2" type="Label" parent="arena2"]
margin_left = 8.0
margin_top = 872.0
margin_right = 1080.0
margin_bottom = 921.0
theme = ExtResource( 4 )
text = "Weapons can fire from the hero unit"
align = 1
__meta__ = {
"_edit_use_anchors_": false
}
[node name="route1" parent="arena2" instance=ExtResource( 5 )]
points = PoolVector2Array( 192, 640, 512, 640 )
start = NodePath("../anchor1")
end = NodePath("../anchor2")
[node name="route2" parent="arena2" instance=ExtResource( 5 )]
points = PoolVector2Array( 512, 640, 832, 640 )
start = NodePath("../anchor2")
end = NodePath("../anchor3")
[node name="anchor1" parent="arena2" instance=ExtResource( 2 )]
position = Vector2( 192, 640 )
[node name="hero" parent="arena2/anchor1" instance=ExtResource( 6 )]
attacker = true
[node name="anchor2" parent="arena2" instance=ExtResource( 2 )]
position = Vector2( 512, 640 )
[node name="avenger" parent="arena2/anchor2" instance=ExtResource( 8 )]
[node name="anchor3" parent="arena2" instance=ExtResource( 2 )]
position = Vector2( 832, 640 )
[node name="avenger" parent="arena2/anchor3" instance=ExtResource( 8 )]
[node name="hand" type="Control" parent="."]
margin_left = 160.0
@ -28,16 +108,10 @@ script = ExtResource( 1 )
__meta__ = {
"_edit_use_anchors_": false
}
attack = true
[node name="card" parent="." instance=ExtResource( 3 )]
[node name="card_unit" parent="." instance=ExtResource( 3 )]
position = Vector2( -320, 0 )
[node name="help" type="Label" parent="."]
margin_left = 170.0
margin_top = 470.0
margin_right = 953.0
margin_bottom = 519.0
theme = ExtResource( 4 )
text = "Drag the card to the anchor, to deploy it"
__meta__ = {
"_edit_use_anchors_": false
}
[node name="card_weapon" parent="." instance=ExtResource( 7 )]
position = Vector2( -320, 520 )

View File

@ -6,7 +6,6 @@
[ext_resource path="res://units/basic/flea.tscn" type="PackedScene" id=4]
[ext_resource path="res://units/basic/avenger.tscn" type="PackedScene" id=5]
[node name="Node2D" type="Node2D"]
[node name="route" parent="." instance=ExtResource( 1 )]
@ -21,9 +20,9 @@ end = NodePath("../anchor3")
[node name="anchor" parent="." instance=ExtResource( 2 )]
position = Vector2( 400, 800 )
content = NodePath("flea")
[node name="flea" parent="anchor" instance=ExtResource( 4 )]
modulate = Color( 1, 1, 1, 1 )
base_move_points = 1
base_hull_points = 2
base_damage_points = 2
@ -32,10 +31,8 @@ playable = true
[node name="anchor2" parent="." instance=ExtResource( 2 )]
position = Vector2( 700, 800 )
content = NodePath("trapper")
[node name="trapper" parent="anchor2" instance=ExtResource( 3 )]
modulate = Color( 0.5, 0.5, 0.5, 1 )
base_move_points = 0
base_hull_points = 1
base_shield_points = 0
@ -43,8 +40,6 @@ base_damage_points = 2
[node name="anchor3" parent="." instance=ExtResource( 2 )]
position = Vector2( 550, 1100 )
content = NodePath("avenger")
[node name="avenger" parent="anchor3" instance=ExtResource( 5 )]
modulate = Color( 0.5, 0.5, 0.5, 1 )
base_shield_points = 3

View File

@ -23,7 +23,6 @@ end = NodePath("../anchor")
[node name="anchor" parent="." instance=ExtResource( 1 )]
position = Vector2( 300, 900 )
content = NodePath("creeper")
[node name="creeper" parent="anchor" instance=ExtResource( 3 )]
modulate = Color( 1, 1, 1, 1 )

View File

@ -133,6 +133,14 @@ func attack(other):
if otherpoints.hull <= 0:
other.destroy()
func do_damage(val):
var selfpoints = get_points()
var fakepoints = load("res://units/points.tscn").instance()
fakepoints.damage = val
BattleHelper.apply_combat(fakepoints, get_points())
if selfpoints.hull <= 0:
destroy()
func reset_state():
dragged = null
$move_hint.visible = false